Ryan C. Gordon
d74182dd40
linux: Simplify D-Bus interface, remove lots of boilerplate.
2017-05-28 07:11:52 -04:00
Ryan C. Gordon
779afcb4ab
linux: Make system D-Bus connection available (in addition to session).
2017-05-28 07:08:10 -04:00
Ryan C. Gordon
fc4b9f7209
wasapi: properly report init failure if on pre-Vista version of Windows.
...
We really should change the Init interface to return 0 on success and -1 on
error, like everything else, to avoid this sort of confusion.
2017-05-28 00:41:55 -04:00
Philipp Wiesemann
3a089295b0
haiku: Fixed SDL_SetClipboardText() allocating too much memory and cutting text.
...
It allocated pointers instead of chars and passed a wrong size to SDL_strlcpy().
2017-05-27 23:30:21 +02:00
Philipp Wiesemann
aaa20b5e5a
Removed unused errno includes.
2017-05-27 23:30:07 +02:00
Ryan C. Gordon
ac5d0eb674
code style: wrap a single-statement if in braces.
2017-05-27 00:33:26 -04:00
Ryan C. Gordon
d0d830b80a
windows: msgboxes should specify a parent HWND if possible (thanks, Ismael!).
...
This lets them be properly modal.
Fixes Bugzilla #3650 .
2017-05-27 00:30:06 -04:00
Philipp Wiesemann
90c0840933
Changed messages about not recognized keys to include discourse link.
2017-05-26 22:45:52 +02:00
Philipp Wiesemann
07ee631e1b
emscripten: Fixed compiling on C89 compilers.
2017-05-26 22:45:40 +02:00
Philipp Wiesemann
ce285c916c
ios: Fixed math include in demos.
2017-05-25 23:01:59 +02:00
Philipp Wiesemann
20515a19e9
directfb: Changed internal function to be static.
2017-05-25 23:01:34 +02:00
Philipp Wiesemann
817d90982b
android: Fixed parameter list in function definitions.
2017-05-25 23:01:16 +02:00
Philipp Wiesemann
c8e66972d0
wayland: Fixed freeing memory of SDL_malloc() with plain free().
2017-05-25 23:00:58 +02:00
Philipp Wiesemann
35e85dd095
Removed unused internal window shape functions.
2017-05-25 23:00:43 +02:00
Ryan C. Gordon
55c65a1616
audio: rename bsd target to netbsd.
...
Apparently this is no longer a generic BSD audio target, and hasn't been for
years, so rename it for NetBSD.
--HG--
rename : src/audio/bsd/SDL_bsdaudio.c => src/audio/netbsd/SDL_netbsdaudio.c
rename : src/audio/bsd/SDL_bsdaudio.h => src/audio/netbsd/SDL_netbsdaudio.h
2017-05-24 19:56:59 -04:00
Ryan C. Gordon
89375f8983
coreaudio: we don't need to track number of allocated audio buffers anymore.
...
CoreAudio takes care of iterating through the buffers and freeing them now,
so we don't have to manage this ourselves.
--HG--
extra : rebase_source : e8145a1b706aff2663a9c877a26270f831ec2481
2017-05-24 13:28:13 -04:00
Ryan C. Gordon
2fbaa741d9
coreaudio: Better handling of audio buffer queue management.
...
We don't fill buffers just to throw them away during shutdown now, we let the
AudioQueue free its own buffers during disposal (which fixes possible warnings
getting printed to stderr by CoreAudio), and we stop the queue after running
any queued audio during shutdown, which prevents dropping the end of the
audio playback if you opened the device with an enormous sample buffer.
Fixes Bugzilla #3555 .
--HG--
extra : rebase_source : 15d909b98765b7099349cb7bb4f2cab90247b653
2017-05-24 13:25:31 -04:00
Charlie Birks
f3ea0c0490
Emscripten: Prevent default on arrow keys
2017-05-24 14:04:39 +01:00
Patrick Monaghan
bc3fe5ac65
Emscripten: fixed incorrect conversion of touch motion events to mouse motion events
2017-05-24 14:04:25 +01:00
Ryan C. Gordon
ada4fe4fe4
coreaudio: looks like we need more like a 10ms buffer minimum, not 50ms.
2017-05-24 01:28:03 -04:00
Ryan C. Gordon
80b14eeb0a
coreaudio: dynamically allocate AudioQueueBuffers.
...
We need more than two buffers to flip between if they are small, or CoreAudio
won't make any sound; apparently it needs X milliseconds of audio queued when
it needs to play more or it drops any queued buffers. We are currently
guessing 50 milliseconds as a minimum, but there's probably a more proper
way to get the minimum time period from the system.
Fixes Bugzilla #3656 .
--HG--
extra : rebase_source : 06d158c6b422a4d8522e56bd414c298c3a08cbcc
2017-05-24 00:12:22 -04:00
Philipp Wiesemann
0a6d2396ee
Removed unnecessary call to free() in testoverlay2 program.
2017-05-20 23:30:47 +02:00
Philipp Wiesemann
51c3597833
Removed unused signal includes and handler in test programs.
2017-05-20 23:30:32 +02:00
Philipp Wiesemann
3ce045742d
Removed redundant mouse clean up on quit for some platforms.
...
SDL_MouseQuit() already frees cursors and sets fields to NULL.
2017-05-19 23:30:59 +02:00
Ryan C. Gordon
f30c59a33f
android: add screenSize to AndroidManifest's configChanges (thanks, Daniel!).
...
Fixes Bugzilla #3448 .
"Starting with Android API 13, another configuration change must be declared
to be handled by the app if it is desired to not let the system handle
rotation itself:
https://developer.android.com/guide/topics/resources/runtime-changes.html#HandlingTheChange
This will have effect if either a developer or SDL per default will set target
API > 12. Currently it is set to 12, but this might change in the future, like
when applying this patch: https://bugzilla.libsdl.org/show_bug.cgi?id=3445
The effect of not having this change applied is that the SDL app is destroyed
upon rotation. Even when the manifest has an additional entry to e.g. always
stay in landscape mode, the onDestroy() call will happen on devices that are
portrait per default, when switching off screen due to power save. The device
will then (at least try to) rotate into portrait to show the portrait screen
lock after resume.
I believe it is safe to apply this patch even with target API still set to 12,
the additional parameter is simply ignored."
2017-05-19 15:06:05 -04:00
Ryan C. Gordon
453b9b12f4
assert: Better Emscripten support.
...
(Better than nothing, that is.)
Fixes Bugzilla #3459 .
2017-05-19 14:51:03 -04:00
Ryan C. Gordon
82582e428f
assert: Check for Clang _and_ GCC, in case they ever drop compatibility.
2017-05-19 14:49:16 -04:00
Ryan C. Gordon
056fecc8ee
assert: allow assertions to work on platforms without threads.
...
Partially fixes Bugzilla #3459 .
2017-05-19 12:54:17 -04:00
Ryan C. Gordon
56d5191aaa
wasapi: don't mark capture devices as failed for AUDCLNT_S_BUFFER_EMPTY.
...
Fixes Bugzilla #3633 .
2017-05-19 12:40:55 -04:00
Ryan C. Gordon
93fd0ff629
render: GL_DestroyRender() should activate first.
...
Otherwise, we might destroy a different GL context's resources.
2017-05-18 21:00:11 -04:00
Ryan C. Gordon
3b8d55b0bc
test: info now reports usable display bounds and DPI (thanks, Eric!).
...
Fixes Bugzilla #3652 .
--HG--
extra : histedit_source : a88217d5ed75f5b0c4738846754fc5879efb7edc
2017-05-18 16:29:10 -04:00
Ryan C. Gordon
0d90f0608e
Patched to compile on Windows.
2017-05-18 16:27:36 -04:00
Ryan C. Gordon
a48985a568
wasapi: Replace tabs with strings in source code.
2017-05-18 15:46:06 -04:00
Ryan C. Gordon
cba06f7e41
wasapi: Deal with AUDCLNT_S_BUFFER_EMPTY when flushing audio device.
2017-05-18 15:43:51 -04:00
Ryan C. Gordon
6fe5b479e5
audio: One more callbackspec fix (thanks, Simon!).
2017-05-18 15:33:17 -04:00
Sam Lantinga
0c453753b8
Fixed restoring a window that was maximized then minimized, then restored.
2017-05-16 17:48:57 -07:00
Sam Lantinga
c56254daa7
SDL - add SDL_WINDOW_VULKAN and make Android_CreateWindow only create an EGLSurface when SDL_WINDOW_VULKAN is not present. This makes it so the ANativeWindow* can be used with vkCreateAndroidSurfaceKHR, otherwise it will fail because having both an EGLSurface and VkSurfaceKHR attached to a window is not allowed according to the Vulkan spec:
...
"In particular, only one VkSurfaceKHR can exist at a time for a given window. Similarly, a native window cannot be used by both a VkSurfaceKHR and EGLSurface simultaneously"
CR: SamL
2017-05-16 06:30:39 -07:00
Philipp Wiesemann
1e42a2d052
Added missing path in porting README.
2017-05-13 23:01:04 +02:00
Philipp Wiesemann
06cf9fb38f
directfb: Fixed compiler warnings about undefined functions.
2017-05-13 23:00:53 +02:00
Philipp Wiesemann
28f72fabd1
emscripten: Fixed not removing pointer lock event callback.
2017-05-13 23:00:35 +02:00
Philipp Wiesemann
0496e42686
emscripten: Changed internal functions to be static.
2017-05-12 23:01:17 +02:00
Philipp Wiesemann
72e6ca71cb
Fixed warnings about shadowed global variable.
...
Found by buildbot.
2017-05-12 23:01:04 +02:00
Philipp Wiesemann
a8cb1dd8f2
directfb: Removed duplicate comment.
2017-05-12 23:00:40 +02:00
Philipp Wiesemann
b30d88aa6e
directfb: Fixed typo in log message.
2017-05-11 23:00:39 +02:00
Philipp Wiesemann
485392625c
directfb: Fixed compiler warnings about unused variables.
2017-05-11 23:00:21 +02:00
Ryan C. Gordon
1cbb5b564a
audio: fixed more "spec" references that should have been "callbackspec".
...
This should catch all the ones for audio targets that have provided their
own audio threads.
2017-05-10 16:18:43 -04:00
Sam Lantinga
176589dd30
Fixed build error on Linux
2017-05-09 03:19:58 -07:00
Sam Lantinga
b3441c1e05
Added support for mixing Qt and SDL on iOS
...
You should call SDL_SetMainReady(), and then customize the QIOSApplicationDelegate like this, in your application code:
/* Additional support for applications mixing Qt and SDL */
@interface QIOSApplicationDelegate : UIResponder <UIApplicationDelegate>
@end
extern "C"
{
void SDL_OnApplicationWillResignActive();
void SDL_OnApplicationDidEnterBackground();
void SDL_OnApplicationWillEnterForeground();
void SDL_OnApplicationDidBecomeActive();
}
@interface QIOSApplicationDelegate (SDL)
- (void)applicationWillResignActive:(UIApplication*)application;
- (void)applicationDidEnterBackground:(UIApplication*)application;
- (void)applicationWillEnterForeground:(UIApplication*)application;
- (void)applicationDidBecomeActive:(UIApplication*)application;
@end
@implementation QIOSApplicationDelegate (SDL)
- (void)applicationWillResignActive:(UIApplication*)application
{
SDL_OnApplicationWillResignActive();
}
- (void)applicationDidEnterBackground:(UIApplication*)application
{
SDL_OnApplicationDidEnterBackground();
}
- (void)applicationWillEnterForeground:(UIApplication*)application
{
SDL_OnApplicationWillEnterForeground();
}
- (void)applicationDidBecomeActive:(UIApplication*)application
{
SDL_OnApplicationDidBecomeActive();
}
@end // QIOSApplicationDelegate
2017-05-09 10:10:42 -07:00
Philipp Wiesemann
0c784def24
haiku: Fixed crash on quit if max number of joysticks was connected.
2017-05-07 21:02:46 +02:00
Philipp Wiesemann
8e8df0c3df
haiku: Changed internal function to be static.
2017-05-07 21:02:31 +02:00