Commit graph

8125 commits

Author SHA1 Message Date
Sam Lantinga
cc1d46d30e Added game controller support for the Razer Serval 2015-05-20 16:28:21 -07:00
Philipp Wiesemann
566df69b69 Added missing loop cancel for Emscripten in test programs. 2015-05-18 21:21:14 +02:00
Philipp Wiesemann
b359854af7 Fixed compiling test program with Emscripten. 2015-05-18 21:17:13 +02:00
Philipp Wiesemann
204e676bfe Fixed handling only one event per frame in test program. 2015-05-18 21:12:16 +02:00
Alex Szpakowski
2190985ce9 Code style cleanup in the GLES and GLES2 render backends. 2015-05-16 17:35:36 -03:00
Alex Szpakowski
58e77377c6 iOS: Added support for SDL_DisableScreenSaver and SDL_EnableScreenSaver. 2015-05-16 16:55:56 -03:00
Philipp Wiesemann
0e132b3325 Android: Replaced logging tag strings with constant. 2015-05-16 21:15:59 +02:00
Philipp Wiesemann
07959a8f94 Emscripten: Fixed wrong source comment and updated web link. 2015-05-16 21:15:27 +02:00
Alex Szpakowski
49d1803fa6 Mac: Use CoreFoundation headers instead of Carbon headers, in GetPowerInfo code. 2015-05-16 12:05:42 -03:00
Sam Lantinga
a891967b73 Added a userdata parameter to SDL_SetWindowsMessageHook() 2015-05-13 22:39:32 -07:00
Sam Lantinga
edc8e4e647 Fixed Mac and Linux builds 2015-05-13 22:39:27 -07:00
Sam Lantinga
51bfd9328e Added SDL_SetWindowsMessageHook() to facilitate full IME support on Windows 2015-05-13 22:39:20 -07:00
Sam Lantinga
1cbf83b0c0 Added generic xinput fallback for XBox compatible controllers on Linux 2015-05-13 22:37:26 -07:00
Alex Szpakowski
06fe127036 Refactored SDL_EGL_CreateContext: It now supports context flags and OpenGL ES 3+ contexts, and its behavior more closely matches the GLX and WGL context creation code.
Improved the code style consistency of SDL_egl.c.

Fixes bugzilla #2865.
2015-05-11 21:03:36 -03:00
Philipp Wiesemann
9a7c04deea Android: Fixed empty parameter list in signatures of internal functions. 2015-05-09 22:42:23 +02:00
Philipp Wiesemann
b3830cc285 Fixed SDL_TouchFingerEvent documentation in header file. 2015-05-08 21:53:02 +02:00
Philipp Wiesemann
8143b8c00b Android: Replaced spaces with tab in Android.mk file. 2015-05-06 21:11:06 +02:00
Philipp Wiesemann
67d7b26b5d Emscripten: Fixed touch coordinates not being normalized. 2015-05-06 21:10:48 +02:00
Philipp Wiesemann
ffb4e63c8d Fixed implicit function declaration in test program. 2015-05-06 21:09:33 +02:00
Alex Szpakowski
112c9e9cc7 Fixed SDL_GL_GetAttribute queries for framebuffer component sizes in Core Profile OpenGL contexts.
Fixes bugzilla #2060.
2015-05-06 12:54:51 -03:00
Alex Szpakowski
7dcb01dd8d Fixed building the iOS Demo files in debug mode 2015-05-06 12:42:14 -03:00
Alex Szpakowski
9e16e61ada Replaced all remaining uses of NSAutoreleasePool with @autoreleasepool blocks (bugzilla #2680.) 2015-05-05 19:01:55 -03:00
Alex Szpakowski
db53123ea2 Fixed a warning when SDL_syswm.h is included in code compiled for iOS with clang. 2015-05-05 16:24:05 -03:00
Alex Szpakowski
91e517df33 Fixed the window offset on iOS when resuming an app with a borderless or fullscreen window that has the on-screen keyboard visible. 2015-05-05 16:20:11 -03:00
Alex Szpakowski
01874284f5 Fixed a crash on iOS when none of the orientations in Info.plist match the SDL window's actual orientation.
Fixes bug #2967.
2015-05-05 16:16:10 -03:00
Sam Lantinga
e983d40007 Fixed bug 2976 - Fix RGBA<->RGBA blit that was broken with the optimization from Bug 11
id.zeta

The optimization from Bug 11 added a code branch on cases where the source RGB masks match the destination RGB masks and a optimized blit function Blit4to4MaskAlpha that always overrides the source alpha info would be chosen. Unfortunately, the branch also errorneously took over the RGBA<->RGBA blitting cases where the source alpha info should be copied, while they would instead get overriden in Blit4to4MaskAlpha.

The attached patch fixes that by handling the RGBA<->RGBA cases correctly in that branch with the original BlitNtoNCopyAlpha as well as uses an optimized Blit4to4CopyAlpha along the same vein.
2015-05-04 21:47:40 -07:00
Ryan C. Gordon
289d6600ff X11: send keypress events before textinput events. 2015-05-01 01:20:28 -04:00
Ryan C. Gordon
0291892654 checkkeys: report SDL_TEXTEDITING events. 2015-05-01 01:19:00 -04:00
Ryan C. Gordon
b78f3a3d40 checkkeys: Readded the KEYUP event test. 2015-05-01 01:12:48 -04:00
Philipp Wiesemann
8dcfd98d27 Android: Deactivated debug log messages on joystick device events. 2015-04-30 21:45:29 +02:00
Dimitris Zenios
e1eebca097 X11: Use our own cut-buffer for intermediate clipboard storage.
XA_CUTBUFFER0 is not defined for holding UTF8 strings.
2015-04-26 13:53:46 +03:00
Sam Lantinga
2dc85e7ed4 Moved code signature step to after the framework build step is complete, and don't hardcode the codesign identity 2015-04-26 20:46:07 -07:00
Sam Lantinga
168076ba13 Turn off code signing by default
Code signature can be added after build with the following command line:
codesign --force --sign 76BB5ACAC44CA5EFA5F879434D157B81DA842CFB SDL2.framework/Versions/A
2015-04-26 20:21:06 -07:00
Sam Lantinga
7a341245a5 Updated project and added code signing for release builds 2015-04-26 15:47:40 -07:00
Ryan C. Gordon
dee33f6150 Only check for Linux-specific input APIs on Linux targets (thanks, Marcus!).
This is only for the configure script. The CMake project files already make
this Linux-exclusive.

Fixes Bugzilla #2659.
2015-04-25 20:49:26 -04:00
Reto Schneider
0970b3829d Remove trailing spaces in Android source code. 2015-04-08 12:14:36 +02:00
Wander Lairson Costa
f2bf946168 Add an entry for X11 "/" key for Brazilian keyboard.
SDL2 reports the following message when we type the "/" on br-abnt2 keyboards:

The key you just pressed is not recognized by SDL. \
To help get this fixed, please report this to the SDL mailing list \
<sdl@libsdl.org> X11 KeyCode 97 (89), X11 KeySym 0x2F (slash).

That's because the corresponding entry in the scancodes table is
marked with value SDL_SCANCODE_UNKNOWN.

This commit fixes that adding the value SDL_SCANCODE_SLASH for this entry.
2014-06-05 11:55:37 -03:00
Ryan C. Gordon
9607613a10 CMake: Slightly better fix for installation target (thanks, Anthony!).
Fixes Bugzilla #2474.

--HG--
extra : rebase_source : cb0c8062e17b7d6d0bb4761e4ad3512a34b0a806
2015-04-22 20:25:19 -04:00
Philipp Wiesemann
8b6cdd0682 Fixed typos in header file documentation comments. 2015-04-22 21:43:22 +02:00
Philipp Wiesemann
958b71701a Fixed SDL_GameControllerOpen() and SDL_JoystickOpen() documentation in header. 2015-04-20 20:03:40 +02:00
Philipp Wiesemann
e67a50bc77 Fixed unsupported doxygen tag in header file. 2015-04-20 20:03:26 +02:00
Ryan C. Gordon
2ec615f2d3 Cleaned up the macro salsa in the Windows timer code.
- Removed USE_GETTICKCOUNT code; it's never used now.
- Reduced the number of preprocessor checks for WinRT.
- Renamed timeSetPeriod() so it doesn't look like a Win32 API call.
2015-04-20 13:43:24 -04:00
Ryan C. Gordon
baad636dfe Windows: Always set the system timer resolution to 1ms by default.
An existing hint lets apps that don't need the timer resolution changed avoid
this, to save battery, etc, but this fixes several problems in timing, audio
callbacks not firing fast enough, etc.

Fixes Bugzilla #2944.

--HG--
extra : rebase_source : 42542a47baca5460939d3aab79b433ec450b5f91
extra : amend_source : 2c057ab8e81da3fcfbcda0bfc47986b1e023881b
2015-04-20 12:22:44 -04:00
Philipp Wiesemann
27ed732abc Fixed return value of SDL_SaveBMP_RW() depending on set errors after NULL input.
If SDL_SaveBMP_RW() was called with NULL passed as SDL_RWops argument, different
values were returned depending on SDL_GetError(). If no error was set before the
call (or SDL_ClearError() was called) then 0 was returned. This is wrong because
nothing was saved. If an error was set before the call then -1 was returned.

This was fixed by directly returning -1 for NULL input instead of deciding based
on SDL_GetError(). No new error is set because this would otherwise override a
maybe more useful error set in SDL_RWFromFile() which is used by SDL_SaveBMP().
2015-04-16 22:04:35 +02:00
Philipp Wiesemann
1244c2068c Linux: Removed not needed platform info from two entries of controller database.
Not needed because entries of this file are selected by conditional compilation.
2015-04-16 22:02:03 +02:00
Philipp Wiesemann
fc24a2d81e Fixed typo in internal joystick documentation comments. 2015-04-15 21:29:55 +02:00
Philipp Wiesemann
bb9dd1ec0c Emscripten: Simplified implementation of joystick update function.
The function was implemented using four loops but only needed two.
2015-04-15 21:27:10 +02:00
Philipp Wiesemann
2a45a031a7 Emscripten: Fixed memory leak if SDL_GetPrefPath() failed. 2015-04-15 21:25:15 +02:00
Philipp Wiesemann
5491fe7094 Android: Fixed lint warning about order of elements in AndroidManifest.xml. 2015-04-13 20:52:38 +02:00
Philipp Wiesemann
e5fe1c05e0 WinRT: Fixed format string for error message. 2015-04-13 20:52:18 +02:00