Commit Graph

10682 Commits

Author SHA1 Message Date
Philipp Wiesemann
3c8a2ea96a Updated a README. 2015-01-26 22:02:53 +01:00
Philipp Wiesemann
89e3e4ea3e Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation
Jonas Kulla

The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c.

I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
2015-01-26 22:00:29 +01:00
Philipp Wiesemann
3263f6fa5e Replaced include of SDL_types.h with SDL_stdinc.h in internal header file.
SDL_types.h is deprecated and currently only includes SDL_stdinc.h itself.
2015-01-08 21:45:46 +01:00
Ryan C. Gordon
bf02bb2582 Clang static analysis builds should use C runtime directly.
This is a little macro magic to use malloc() directly instead of SDL_malloc(),
 etc, so static analysis tests that know about the C runtime can function
 properly, and understand that we are dealing with heap allocations, etc.

This changed our static analysis report from 5 outstanding bugs to 30.

5x as many bugs were hidden by SDL_malloc() not being recognized as malloc()
 by the static analyzer!
2015-01-05 01:41:42 -05:00
Ryan C. Gordon
15235dc21b Dynamic API: don't leak if a library loaded but didn't have the entry point. 2015-01-05 01:07:36 -05:00
Philipp Wiesemann
68f36b883e Removed unused enumeration and constant from internal header file. 2014-12-31 21:00:32 +01:00
Philipp Wiesemann
2acb538412 Fixed copyright date. 2014-12-28 22:10:24 +01:00
Philipp Wiesemann
ad3db2a2be Linked README-emscripten.md in README.md and added markdown formatting. 2014-12-28 22:02:17 +01:00
Philipp Wiesemann
ced2d4907f Renamed README-emscripten.txt to README-emscripten.md. 2014-12-28 22:00:24 +01:00
Ryan C. Gordon
2bdda97c77 Cleaned up some compiler warnings. 2014-12-26 23:16:54 -05:00
Ryan C. Gordon
3557a42192 GLES2: Only use VBOs for Emscripten (for now).
This is causing a regression on actual iOS hardware, which we should revisit
 after 2.0.4 ships.
2014-12-26 22:30:19 -05:00
Philipp Wiesemann
db05daf61e Added three missing checks for return values of SDL_calloc(). 2014-12-26 20:11:28 +01:00
David Ludwig
ad95e7867e WinRT: hiding SDL_WinRTRunApp's XAML functionality, until it's ready for use
SDL_WinRTRunApp() is used on WinRT to launch a main(int, char **)-style
function.  It has optional, and experimental support for launching content
inside a XAML control, backed by a main() function running on a separate thread.
This is provided via it's 2nd parameter, which can be a pointer to a XAML
control.  (If NULL, XAML support will not be used.)

This change renames the experimental feature's parameter (to SDL_WinRTRunApp())
as "reserved", until such time as the functionality is ready for use.  It will
likely be renamed again in the future, when running SDL on top of a XAML control
via a separate thread, becomes reasonably usable.
2014-12-24 11:33:42 -05:00
Philipp Wiesemann
313c38e43f Removed missing test program from Makefile. 2014-12-25 22:47:04 +01:00
Philipp Wiesemann
9039d4f5cd Changed Emscripten entry in gamecontroller database to allow sorting by script. 2014-12-25 22:43:17 +01:00
Philipp Wiesemann
4df8ffb5df Removed unnecessary call to SDL_free(). 2014-12-25 22:08:48 +01:00
Philipp Wiesemann
72952d4d7e Fixed typos in a README. 2014-12-25 22:07:15 +01:00
Philipp Wiesemann
aa044a25c5 Fixed typo in header file documentation comment. 2014-12-25 22:05:48 +01:00
Philipp Wiesemann
f0061c9f70 Fixed compile warnings about unused variables.
Found by buildbot.
2014-12-25 22:03:07 +01:00
Philipp Wiesemann
024f1a0155 Fixed compile errors in example programs. 2014-12-25 21:42:56 +01:00
Ryan C. Gordon
e9afc9c6e2 Maybe actually patched to compile this time? 2014-12-24 22:22:35 -05:00
Ryan C. Gordon
ab03b7cde7 Actually fix Unix scripts this time. :) 2014-12-24 13:23:48 -05:00
Ryan C. Gordon
2197ac814d Really patched to compile this time? 2014-12-24 13:21:28 -05:00
Ryan C. Gordon
13699c157c Patched to compile. 2014-12-24 13:16:27 -05:00
Ryan C. Gordon
7f4293d409 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
d849777d12 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
8399b054df Added buildbot script for Emscripten port. 2014-12-24 12:49:35 -05:00
Ryan C. Gordon
9a4c98c6f9 Maybe patched to compile on Windows for real now? 2014-12-24 02:12:16 -05:00
Ryan C. Gordon
5f91cafa6c Patched to compile on Windows. 2014-12-24 02:06:38 -05:00
Ryan C. Gordon
c6db647a88 Patched to compile on non-Emscripten targets. 2014-12-24 02:01:12 -05:00
David Ludwig
1fb39fe9f4 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/bea2e725e29a

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
c03e66f608 Fixed X11 build, added code to print initial modifiers to checkkeys 2015-05-28 09:52:48 -07:00
Sam Lantinga
236c23dc8e 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
1ed58e87b9 Fixed Windows build 2015-05-28 08:51:59 -07:00
Sam Lantinga
a0fee2b3ef 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
f31caf461b I think this will be the time... 2015-05-28 01:27:24 -04:00
Ryan C. Gordon
0d19c170d8 Still trying to get this to compile... 2015-05-28 01:22:14 -04:00
Ryan C. Gordon
04f8adf125 More patching to compile... 2015-05-28 01:16:55 -04:00
Ryan C. Gordon
e8cb0fc82b Another attempt to get this to compile. 2015-05-28 01:08:33 -04:00
Ryan C. Gordon
d15111cef8 Patched to compile on MingW.
(I think!)
2015-05-28 01:02:03 -04:00
Ryan C. Gordon
5f111141e4 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
ee52b70032 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
b4d54519bf Patched to compile on C89 compilers. 2015-05-27 19:00:56 -04:00
Ryan C. Gordon
cbed839222 Wayland: Avoid NULL dereference after window destruction (thanks, "x414e54"!).
Fixes Bugzilla #2934.
2015-05-27 18:54:06 -04:00
Sam Lantinga
fcc9350a83 Fixed detecting PS4 wired controller on Windows 2015-05-27 10:29:43 -07:00
Ryan C. Gordon
840f79e5ab Back out changeset 12d477422f47.
This change didn't do what I thought it did, sorry.
2015-05-26 22:57:42 -04:00
Ryan C. Gordon
da992de527 X11: generate clipboard update events (thanks, "chw"!).
Partially fixes Bugzilla #2266.
2015-05-26 21:29:45 -04:00
Ryan C. Gordon
1c4d384a54 Uh, yeah, it helps to press "Save" before committing... 2015-05-26 21:30:41 -04:00
Ryan C. Gordon
8de942f192 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
906a4d69c1 Stack hint should look for 0, not -1, and not care about environment variables. 2015-05-26 21:19:23 -04:00