Commit Graph

4697 Commits (c528615626d9f7789a5681a946cb3d5bd5d68c2c)

Author SHA1 Message Date
Philipp Wiesemann 22855927ce Removed unnecessary call to SDL_free(). 2014-12-25 22:08:48 +01:00
Philipp Wiesemann 2cde19c635 Fixed typos in a README. 2014-12-25 22:07:15 +01:00
Philipp Wiesemann 80d19b7ee3 Fixed typo in header file documentation comment. 2014-12-25 22:05:48 +01:00
Philipp Wiesemann 79b3221b0e Fixed compile warnings about unused variables.
Found by buildbot.
2014-12-25 22:03:07 +01:00
Philipp Wiesemann 97e876671b Fixed compile errors in example programs. 2014-12-25 21:42:56 +01:00
Ryan C. Gordon e8467cbca9 Maybe actually patched to compile this time? 2014-12-24 22:22:35 -05:00
Ryan C. Gordon 629c13fbf1 Actually fix Unix scripts this time. :) 2014-12-24 13:23:48 -05:00
Ryan C. Gordon 9c38244f5d Really patched to compile this time? 2014-12-24 13:21:28 -05:00
Ryan C. Gordon 9f111ce4b9 Patched to compile. 2014-12-24 13:16:27 -05:00
Ryan C. Gordon 208636828d I don't know if Unix scripts are useful at all on Emscripten, but fix them up. 2014-12-24 13:13:19 -05:00
Ryan C. Gordon fc40516744 A little more work on the Emscripten buildbot script.
Should upload tarballs now, etc.
2014-12-24 13:03:20 -05:00
Ryan C. Gordon f4bd828af5 Added buildbot script for Emscripten port. 2014-12-24 12:49:35 -05:00
Ryan C. Gordon eab2433f6d Maybe patched to compile on Windows for real now? 2014-12-24 02:12:16 -05:00
Ryan C. Gordon b0ebfabf33 Patched to compile on Windows. 2014-12-24 02:06:38 -05:00
Ryan C. Gordon 707c11f64f Patched to compile on non-Emscripten targets. 2014-12-24 02:01:12 -05:00
David Ludwig a6df21cd00 Partial fix for bug 2726 - Win32 'mouse' events not applying 'SDL_TOUCH_MOUSEID'
This is a Win32-specific fix for bug 2726.  A WinRT fix for this bug was applied
separately, via https://hg.libsdl.org/SDL/rev/91f56dcad879

This fix applies SDL_TOUCH_MOUSEID to 'mouse' events coming from touch devices,
but only when relative-mouse-mode is turned OFF.  This bug is still present
when relative-mouse-mode is ON, however Microsoft does not provide documentation
on whether or not those input events (which come from WM_INPUT) can be
identified as touch-specific or not.  Unofficially, that data might be available
(via GetMessageExtraInfo()), however this patch only uses MS-documented APIs.
2014-12-20 11:45:39 -05:00
Sam Lantinga 719bb6fcee Fixed X11 build, added code to print initial modifiers to checkkeys 2015-05-28 09:52:48 -07:00
Sam Lantinga 0694baf260 Fixed bug 2736 - X11 doesn't set KMOD_NUM and KMOD_CAPS to system state
Zack Middleton

Using X11 (on Debian Wheezy), SDL_GetModState() & KMOD_NUM and KMOD_CAPS are not set to system state (numlock/capslock LEDs). Pressing numlock or capslock toggles the mod state, though if num/caps lock is enabled before starting the program it's still reversed from system state. This makes getting KMOD_NUM and KMOD_CAPS in programs unreliable. This can be seen using the checkkeys test program.

The function that appears to have handle this in SDL 1.2 is X11_SetKeyboardState. The function call is commented out with "FIXME:" in SDL 2.

Using Windows backend through WINE; on first key press if numlock and/or capslock is enabled on system, numlock/capslock SDL_SendKeyboardKey is run and toggles KMOD_NUM/KMOD_CAPS to the correct state. On X11 this does not happen.

The attached patch makes X11 backend set keyboard state on window focus if no window was previously focused. It sets all keys to system up/down state and toggles KMOD_NUM/KMOD_CAPS via SDL_SendKeyboardKey to match system if needed. The patch is based on SDL 1.2's X11_SetKeyboardState.
2015-05-28 09:33:47 -07:00
Sam Lantinga 779d403563 Fixed Windows build 2015-05-28 08:51:59 -07:00
Sam Lantinga 0669a224f5 Fixed bug 2860 - SetProp must be paired with RemoveProp especially for properties added to external windows
Coriiander

Upon creating a window, a window property is added to it through the Win32-function "SetProp". This is done in the SDL-function "SetupWindowData" in file "src\video\windows\SDL_windowswindow.c".

Whenever you call "SetProp" to add a property to a Win32-window, you should also call the Win32-function "RemoveProp" to remove it before destroying that Win32-window.

While you might think that it's ok and that Windows will clean up nicely itself, it is not ok. It is against all Win32-API guidelines and is mostlikely a leak. Especially on external windows (CreateWindowFrom) you want to have things done right, not messy and leaky, affecting some other module. Even if SDL gets shutdown entirely that external window will now forever still have the "SDL_WindowData" prop attached to it.
2015-05-28 08:41:07 -07:00
Ryan C. Gordon 84ce000670 I think this will be the time... 2015-05-28 01:27:24 -04:00
Ryan C. Gordon 7964f3adb2 Still trying to get this to compile... 2015-05-28 01:22:14 -04:00
Ryan C. Gordon cae4fd7fb2 More patching to compile... 2015-05-28 01:16:55 -04:00
Ryan C. Gordon e90f87bab0 Another attempt to get this to compile. 2015-05-28 01:08:33 -04:00
Ryan C. Gordon 4add16943e Patched to compile on MingW.
(I think!)
2015-05-28 01:02:03 -04:00
Ryan C. Gordon 58447b24c1 Move tests from SDL_config higher up in Windows joystick/haptic code.
Fixes Bugzilla #2932.
2015-05-28 00:54:52 -04:00
Ryan C. Gordon 2a75782553 X11: Add Xdbe support to message boxes (thanks, Melker!).
Without this, message boxes with a lot of text will noticibly flicker as
you mouse over buttons.

Fixes Bugzilla #2343.
2015-05-28 00:30:21 -04:00
Ryan C. Gordon bea1854cac Patched to compile on C89 compilers. 2015-05-27 19:00:56 -04:00
Ryan C. Gordon 9c343681c4 Wayland: Avoid NULL dereference after window destruction (thanks, "x414e54"!).
Fixes Bugzilla #2934.
2015-05-27 18:54:06 -04:00
Sam Lantinga 7f17e0ab9e Fixed detecting PS4 wired controller on Windows 2015-05-27 10:29:43 -07:00
Ryan C. Gordon 80cfccbf8d Back out changeset b80349dd6d40.
This change didn't do what I thought it did, sorry.
2015-05-26 22:57:42 -04:00
Ryan C. Gordon c69a559239 X11: generate clipboard update events (thanks, "chw"!).
Partially fixes Bugzilla #2266.
2015-05-26 21:29:45 -04:00
Ryan C. Gordon 059a030716 Uh, yeah, it helps to press "Save" before committing... 2015-05-26 21:30:41 -04:00
Ryan C. Gordon cc493d7195 X11: use XA_STRING for text SDL puts on the clipboard (thanks, "chw"!).
Partially fixes Bugzilla #2266.
2015-05-26 21:26:27 -04:00
Ryan C. Gordon baea64e642 Stack hint should look for 0, not -1, and not care about environment variables. 2015-05-26 21:19:23 -04:00
Ryan C. Gordon a8fa7bd1f7 Added a hint to specify new thread stack size (thanks, Gabriel!).
Fixes Bugzilla #2019.

(we'll do a better fix when we break the API in SDL 2.1.)
2015-05-26 21:13:27 -04:00
Ryan C. Gordon bcdc63a38b Properly report DX headers in the CMake project files (thanks, "MailMr_S"!).
Fixes Bugzilla #2900.
2015-05-26 21:09:48 -04:00
Alex Baines dae40bff0d [IBus] Only register interest in messages sent to our input context. 2015-02-27 21:17:29 +00:00
Alex Baines 42d9cf6978 [ibus] Send an empty TextEditing event when the text is cleared by pressing backspace. 2015-02-01 21:08:54 +00:00
Ryan C. Gordon 21d0cdedb3 Added some unknown keys from Japanese 106/109 keyboards (thanks, "ver0hiro"!).
This adds them for Windows and X11.

Fixes Bugzilla #2820.
2015-05-26 20:55:03 -04:00
Alex Szpakowski 262e8ef3f0 Mac: Send a window resize event when the window's backing scale factor changes.
The backing scale factor can change when the window moves between retina and non-retina displays.

The only other way to detect such a change is to compare the output of SDL_GL_GetDrawableSize or SDL_GetRendererOutputSize every frame, which is less than desirable, especially since the necessary app logic is likely already being executed when a window resize event is received.
2015-05-26 21:51:47 -03:00
Ryan C. Gordon be89fa09ef Reset the keyboard state when launching a message box (thanks, Sean!).
Otherwise, pressed keys get stuck.

Fixes Bugzilla #2776.
2015-05-26 20:49:27 -04:00
Ryan C. Gordon 41908548b9 Windows: Alt-F4 hotkey should be checked on keydown, not keyup (thanks, Matt!).
Fixes Bugzilla #2780.
2015-05-26 20:40:00 -04:00
Ryan C. Gordon 72a244da41 Android: Added basic drop file support (thanks, "noxalus"!).
This lets SDL-based apps respond to "Open With" commands properly, as they
can now obtain the requested path via a standard SDL dropfile event.

This is only checked on startup, so apps don't get drop events at any other
time, even if Android supports that, but this is still a definite
improvement.

Fixes Bugzilla #2762.
2015-05-26 20:36:45 -04:00
Alex Baines ae6555dff8 Pump IBus events after X events. 2015-05-26 20:22:14 -04:00
Ryan C. Gordon 46f758aebb Fix a libtool issue with some mingw-w64 cross compilers (thanks, Ozkan!).
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15321
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commit;h=0ebb734910bf56186dd0c0e84b1c8be507bad336

Fixes Bugzilla #2722.
2015-05-26 19:54:06 -04:00
Alex Szpakowski a4f0daedae EGL: OpenGL ES 3.0 contexts can now be created without the EGL_KHR_create_context extension.
Fixes bugzilla #2994.
2015-05-26 19:34:56 -03:00
Ryan C. Gordon d5a578531b Drop out of SDL_UpdateTexture() early if the rectangle is zero pixels.
Hopefully makes static analysis happy about a zero-byte malloc elsewhere.
2015-05-26 16:42:36 -04:00
Ryan C. Gordon 2e2b84fb32 Some setups need _GNU_SOURCE to make LLONG_MAX available (thanks, Ozkan!).
Fixes Bugzilla #2721.
2015-05-26 16:31:11 -04:00
Ryan C. Gordon a21672c893 Fix fallback define for DECLSPEC for non-Windows platforms.
Looks like it was a copy/paste error?

GCC doesn't support visibility attributes until gcc4, so just make it blank.

Fixes Bugzilla #2720.
2015-05-26 16:25:22 -04:00