Commit Graph

4766 Commits (46af90d8c3646cb820354e6a562cb823c89efc8f)

Author SHA1 Message Date
Hugh McMaster 46af90d8c3 Add a configure option allowing users to choose whether to install sdl2-config
sdl2-config is installed by default if no flag is specified.
2019-04-07 23:01:07 +10:00
Sylvain Becker 2c92c8e85a Android: add static variable initialization in non blocking event loop 2019-04-23 14:24:58 +02:00
Sam Lantinga cb18117c92 Added a helper function to tell whether or not a window can be minimized 2019-04-22 16:34:42 -07:00
Sam Lantinga f1b57f3785 Only leave fullscreen mode if we're actually going to minimize 2019-04-22 16:25:49 -07:00
Sam Lantinga 9950271bb6 Fixed bug 4580 - Android 8: immersive fullscreen notification causes flickering between fullscreen and non-fullscreen and app is unresponsive
Sylvain 2019-04-18 21:22:59 UTC

Changes:
- SDL_WINDOWEVENT_FOCUS_GAINED and SDL_WINDOWEVENT_FOCUS_LOST are sent when the java method onWindowFocusChanged() is called.

- If we have support for MultiWindow (eg API >= 24), SDL event loop is blocked/un-blocked (or simply egl-backed-up or not), when java onStart()/onStop() are called.

- If not, this behaves like now, SDL event loop is blocked/un-blocked when onPause()/onResume() are called.

So if we have two app on screen and switch from one to the other, only FOCUS events are sent (and onPause()/onResume() are called but empty. onStart()/onStop() are not called).
The SDL app, un-focused, would still continue to run and display frames (currently the App would be displayed, but paused).
Like a video player app or a chronometer that would still be refreshed, even if the window hasn't the focus.
It should work also on ChromeBooks (not tested), with two apps opened at the same time.


I am not sure this fix Dan's issue. Because focus lost event triggers Minimize function (which BTW is not provided on android).
https://hg.libsdl.org/SDL/file/bb41b3635c34/src/video/SDL_video.c#l2653
https://hg.libsdl.org/SDL/file/bb41b3635c34/src/video/SDL_video.c#l2634

So, in addition, it would need to add by default SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS to 0.
So that the lost focus event doesn't try to minimize the window. And this should fix also the issue.
2019-04-22 16:19:52 -07:00
Ryan C. Gordon 2f6c988e7c configure: Cleaned up audio/video summaries when building for Windows. 2019-04-21 21:34:14 -04:00
Alex Szpakowski 90b08881ab iOS: Remove code trying to support compilation on the iOS 7 SDK, the deployment target has been set to iOS 8 for years and there's other unconditionally compiled code that depends on newer SDKs so that code is useless. 2019-04-17 20:41:05 -03:00
Alex Szpakowski 9d7b26155a macOS: Fix compilation when using the 10.9 SDK or older. 2019-04-17 20:14:40 -03:00
Sam Lantinga cf87d5764d Explicitly load hidapi as a dependency of the SDL library
This fixes loading on Android 4.2
2019-04-16 20:00:14 -07:00
Ethan Lee f07c992bb8 hidapi: Add GCN L/R buttons, just in case someone wants them... 2019-03-17 12:36:40 -04:00
Sylvain Becker bd344c2287 Android: when event loop is not blocking in pause, backup EGL context (Bug 4578)
Backup the EGL context when SDL_APP_DIDENTERBACKGROUND has been removed from the
event queue.
2019-04-12 23:15:26 +02:00
Alex Szpakowski 00c824a8b0 Fix disabling OpenGL vsync on macOS 10.14.4+ (bug #4575). 2019-04-10 22:30:58 -03:00
Sylvain Becker aae49015da Fixed bug 4581 - generate synthetic mouse events at window boundaries
when real touch events are actually outside the window.
2019-04-10 10:59:53 +02:00
Sylvain Becker cfefe5434a Fixed bug 4581 - mouse events with SDL_TOUCH_MOUSEID make window lost focus
Virtual mouse events should never leave the window or change focus for single window applications.
2019-04-08 21:27:24 +02:00
Sylvain Becker d68e501db4 Fixed bug 4582 - Maximize/Resize not working on Windows 10
When viewport is set, projectionAndView changes, but ID3D11DeviceContext_UpdateSubresource was not called.
2019-04-08 13:43:48 +02:00
Sylvain Becker eb7affeeb8 SDL_HINT_MOUSE_TOUCH_EVENTS: move tracking appart in case of 'window' is null 2019-04-06 21:52:51 +02:00
Sylvain Becker a1a9fd50c6 Bug 4581: move tracking appart so it doesn't require the window to have focus 2019-04-06 21:43:16 +02:00
Sam Lantinga a46af76b07 Fixed bug 4579 - SDL_android.c s_active not being atomic
Isaias Brunet

This bug cause a false assert due to multiple threads modifying the same variable without any atomic operation.
2019-04-05 08:15:01 -07:00
Sam Lantinga 9eac91dd29 Set SDL_HINT_MOUSE_TOUCH_EVENTS for iPhone and iPad as well 2019-04-05 08:10:12 -07:00
Sam Lantinga b6f33a6870 https://bugzilla.libsdl.org/show_bug.cgi?id=4577
SDL_GetWindowDisplayMode was returning an incorrect result on iPhone Plus devices (tested on iOS 12.1/12.2).  The problem was that the value returned by UIScreenMode was assumed to be the physical pixels on the display, rather than the scaled retina pixels.  The fix is to use the scale returned by UIScreen.scale rather than the nativeScale.
2019-04-05 07:51:11 -07:00
Sylvain Becker 05333a6e9f Android: add hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE
to set whether the event loop will block itself when the app is paused.
2019-04-05 09:16:30 +02:00
Sylvain Becker b470cd9b09 Android: default SDL_HINT_MOUSE_TOUCH_EVENTS to 1 as previous behaviour 2019-04-05 08:36:31 +02:00
Sylvain Becker 6f732d4ee8 Update WhatsNew.txt 2019-04-04 20:24:22 +02:00
Sylvain Becker 458c60e6a4 Update WhatsNew.txt 2019-04-04 20:10:55 +02:00
Sylvain Becker bfdd0b228a Android: remove SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH
java layer runs as if separate mouse and touch was 1,
Use SDL_HINT_MOUSE_TOUCH_EVENTS and SDL_HINT_TOUCH_MOUSE_EVENTS
for generating synthetic touch/mouse events
2019-04-04 17:01:02 +02:00
Sylvain Becker e41576188d Add hint SDL_HINT_MOUSE_TOUCH_EVENTS for mouse events to generate touch events
controlling whether mouse events should generate synthetic touch events
By default SDL will *not* generate touch events for mouse events
2019-04-04 16:51:50 +02:00
Sylvain Becker ab03892ddf Bug 4576: track both FingerId and TrackId 2019-04-04 15:19:00 +02:00
Sylvain Becker e39c0a1f7d Bug 4576: fix wrong scaling 2019-04-03 10:14:42 +02:00
Sylvain Becker 236b86067f Bug 4576: one more warning 2019-04-02 18:07:27 +02:00
Sylvain Becker b45abbb2a7 Bug 4576: fix warning and compile 2019-04-02 17:57:27 +02:00
Sylvain Becker 9b3c2258aa Bug 4576: remove touch/mouse duplication for Android 2019-04-02 17:23:55 +02:00
Sylvain Becker 9d28156f12 Bug 4576: remove touch/mouse duplication for IOS 2019-04-02 17:18:47 +02:00
Sylvain Becker 42de5f97cc Bug 4576: remove touch/mouse duplication for WinRT 2019-04-02 17:13:22 +02:00
Sylvain Becker b086edc915 Bug 4576: remove touch/mouse duplication for Emscripten 2019-04-02 17:10:29 +02:00
Sylvain Becker b8e5c561d8 Bug 4576: remove touch/mouse duplication for Wayland 2019-04-02 17:07:54 +02:00
Sylvain Becker 6bc2d9de1f Bug 4576: remove touch/mouse duplication for linux/EVDEV 2019-04-02 17:03:58 +02:00
Sylvain Becker 1a4c3b57b7 Bug 4576: remove touch/mouse duplication for Windows 2019-04-02 16:58:11 +02:00
Sylvain Becker a3f2c446ef Bug 4576: handle mapping of TouchEvents to MouseEvents at higher level 2019-04-02 16:46:17 +02:00
Sam Lantinga 1febfedf85 configure.in: Rename configure.ac to fix an 'aclocal' warning 2019-04-02 05:31:08 -07:00
Hugh McMaster 14b385f2bf docs: Replace references to configure.in with configure.ac 2019-03-27 20:58:33 +11:00
Hugh McMaster af4bbb3064 configure.in: Rename to configure.ac to fix an 'aclocal' warning
Also rename references in related files.
2019-03-25 23:01:32 +11:00
Sam Lantinga 9a8d5215c6 Handle potentially calling SDL_JoystickUpdate() and SDL_JoystickQuit() at the same time. 2019-03-27 08:17:05 -07:00
Ryan C. Gordon 2fbfe8b912 coreaudio: Set audio callback thread priority.
Fixes Bugzilla #4155.
2019-03-25 12:59:30 -04:00
Ryan C. Gordon 6a3356ab3f Backed out changeset cec31de4e126
This was meant to migrate CoreAudio onto the same SDL_RunAudio() path that
most other audio drivers are on, but it introduced a bug because it doesn't
deal with dropped audio buffers...and fixing that properly just introduces
latency.

I might revisit this later, perhaps by reworking SDL_RunAudio to allow for
this sort of API better, or redesigning the whole subsystem or something, I
don't know. I'm not super-thrilled that this has to exist outside of the usual
codepaths, though.

Fixes Bugzilla #4481.
2019-03-25 12:24:38 -04:00
Ryan C. Gordon 8ab698af15 opengles2: Fix static analysis warning.
Not clear if this could ever dereference NULL in real life, but better safe
than sorry!
2019-03-21 10:39:49 -04:00
Sam Lantinga 01c924fa9e Hopefully fixed the mingw32 build 2019-03-19 17:20:54 -07:00
Sam Lantinga deb7d08c28 Fixed Visual Studio build 2019-03-19 17:05:22 -07:00
Sam Lantinga ac23d78f7a Didn't need to add SDL_windows.h include, that was already included 2019-03-19 16:53:55 -07:00
Sam Lantinga b2e76d860f Fixed Windows RT build 2019-03-19 16:52:09 -07:00
Sam Lantinga a71489221b Fixed archiving the SDL dynamic library on iOS and tvOS 2019-03-19 11:02:43 -07:00