Commit Graph

8369 Commits

Author SHA1 Message Date
Philipp Wiesemann c0165972c3 Fixed typos in header file documentation comments. 2014-11-23 20:40:48 +01:00
Philipp Wiesemann 097ad55000 Fixed local reference leaks in messagebox implementation for Android. 2014-11-23 20:38:18 +01:00
Philipp Wiesemann c121ff7f9a Added name for second Java Thread on Android. 2014-11-23 20:35:51 +01:00
David Ludwig d9a42c76b1 WinRT: fixed an invalid comment in SDL_GetPrefPath() (for WinRT) 2014-11-23 08:59:01 -05:00
David Ludwig 13c511697c WinRT: allowed 'roaming' and 'temp' folder paths to be retrieved on WinPhone 8.1
Windows Phone 8.0 either did not define, or provide access to, a 'RoamingFolder'
or 'TemporaryFolder' for apps to use.  Windows 8.0 and 8.1 do, as does
Windows Phone 8.1.  This change allows SDL-based Windows Phone 8.1 apps to
access these folders, via either the SDL_WinRTGetFSPathUNICODE() or
SDL_WinRTGetFSPathUTF8() functions.

SDL_GetPrefPath(), which on WinRT, is based on SDL_WinRTGetFSPathUTF8(), will
continue to return the app's 'local' folder, despite Windows 8.x
counterpart apps using the 'roaming' folder, in order to preserve compatibility
when 8.0-based Phone apps upgrade to 8.1-based Phone apps.
2014-11-23 08:52:10 -05:00
Philipp Wiesemann a690944e44 Fixed typo in header file documentation comment. 2014-11-23 11:26:46 +01:00
David Ludwig 5575948b37 Fixed bug 2726 - WinRT touches not setting 'which' field in virtual mouse events
This patch makes sure that any SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONUP, and
SDL_MOUSEMOTION events, as triggered by a touch event in a WinRT app, set the
event's 'which' field to SDL_TOUCH_MOUSEID.  Previously, this was getting set
to the same value as events from a real mouse, '0'.

Thanks to Diego for providing information on this bug, and to Tamas Hamor for
sending over a patch!
2014-11-22 21:13:46 -05:00
Philipp Wiesemann 9c398852e6 Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
David Ludwig 167b3bb4cd WinRT: updated docs to include details of recently-expanded GLES2 support 2014-11-02 11:26:54 -05:00
David Ludwig 577ef5e0b6 WinRT: fixed crash when trying, and failing, to load the opengles2 renderer
The crash would occur when a WinRT app explicitly tried to create an
SDL_Renderer using the "opengles2" renderer (via SDL_HINT_RENDER_DRIVER), but
OpenGL ES 2 / ANGLE .dlls weren't packaged in the app.
2014-11-02 10:38:29 -05:00
David Ludwig bbe1df0d51 WinRT: enabled OpenGL ES 2 support on Windows Phone
The "future-dev" branch of MSOpenTech's ANGLE/WinRT repository (at
https://github.com/msopentech/angle) includes support for Windows Phone 8.1.
This change allows it to be used in conjunction with SDL's OpenGL functions.
2014-11-02 10:32:25 -05:00
David Ludwig 18ecc34dfd WinRT: updated an OpenGL-related code-comment 2014-11-02 09:02:01 -05:00
David Ludwig 0bcc254e4f WinRT: expanded OpenGL ES 2 support to enable recent updates to ANGLE/WinRT
ANGLE for WinRT has at least two versions:
- an older version, which supports Windows 8.0 and 8.1.  This is currently
  the "winrt" branch in MSOpenTech's ANGLE repository (at
  https://github.com/msopentech/angle)
- a newer version, which drops support for Windows 8.0, but is under more
  active development (via MSOpenTech's "future-dev" branch), and which was
  recently merged into the ANGLE project's official "master" branch
  (at https://chromium.googlesource.com/angle/angle)

Both versions are setup using slightly different APIs.  SDL/WinRT will now
attempt to detect which version is being used, and configure it appropriately.
2014-11-02 08:47:05 -05:00
David Ludwig 1c85ba23df WinRT: moved documentation + setup related TODO items out of README-winrt.md
The TODO items were moved to SDL Bugzilla, case 2775 (https://bugzilla.libsdl.org/show_bug.cgi?id=2775).
2014-11-01 11:41:18 -04:00
David Ludwig 796f7bbf0c WinRT: made README-winrt.md slightly easier to read in an 80-column text editor 2014-11-01 11:17:07 -04:00
David Ludwig 438a55a49c WinRT: added details of the port's status, to README-winrt.md 2014-11-01 11:14:46 -04:00
Ryan C. Gordon 43ad9670e6 Patched to compile on pre-C99 compilers. 2014-10-30 13:44:31 -04:00
Dmitry Rekman 3a916c6d7b X11: Fixed SDL_GetGlobalMouseState() to work better with multimonitor configs.
Fixes Bugzilla #2770.

Thanks to Epic Games for contributing this fix.
2014-10-29 22:55:40 -04:00
Philipp Wiesemann 37720dd5f2 Fixed gamecontroller database sorting script not sorting the whole database.
The script was originally written for an SDL_gamecontrollerdb.h which had groups
of mappings separated by single lines starting with a "#". This was changed some
time ago to #endif/#if pairs. Because the script assumed only a single #endif in
the whole file it no longer worked correctly and only processed the first group.
2014-10-29 22:44:35 +01:00
Philipp Wiesemann 0c60f023f5 Removed unnecessary NULL check. 2014-10-29 22:41:01 +01:00
Philipp Wiesemann 2bdc5c9d7a Updated gamecontroller database sorting script to work with Python 3. 2014-10-29 20:35:21 +01:00
Philipp Wiesemann 032b14e7b6 Fixed SDL_AddHintCallback() crashing if no more memory available.
The return value of SDL_malloc() was not checked and NULL therefore not handled.
Also added setting of error message for the other SDL_malloc() in this function.
2014-10-29 20:29:32 +01:00
Philipp Wiesemann 2a46a9df21 Fixed bug 2647 - Memory leak in SDL_AddHintCallback function - SDL_hints.c
Nitz

Variable entry going out of scope leaks the storage it points to, at:

        /* Need to add a hint entry for this watcher */
        hint = (SDL_Hint *)SDL_malloc(sizeof(*hint));
        if (!hint) {
            return;
        }

Patch is attached.
2014-10-29 20:20:47 +01:00
Alex Szpakowski fb6d185a8a Merged default into iOS-improvements 2014-10-28 18:36:29 -03:00
Alex Szpakowski 28fe9f0cfc Switched to the core versions of OpenGL ES framebuffer object and renderbuffer functions.
Both the extension (OES) and the core versions work, but the core versions are more correct for GLES2+ and they're less verbose.
2014-10-28 01:34:40 -03:00
David Ludwig f2bd99da68 WinRT: detailed steps, via the WinRT README, to fix a common build error 2014-10-27 19:53:44 -04:00
Philipp Wiesemann 3d2ca92e6a Fixed two typos in header file comment. 2014-10-27 12:53:47 +01:00
Philipp Wiesemann 7268eabb9b Added handling of NULL as input for SDL_GameControllerAddMapping(). 2014-10-26 23:28:45 +01:00
Philipp Wiesemann 33a2b58ca4 Fixed SDL_GameControllerMappingForGUID() crashing if no more memory available.
The return value of SDL_malloc() was not checked and NULL therefore not handled.
NULL returned by SDL_GameControllerMapping()/SDL_GameControllerMappingForGUID()
now either means "no mapping" (as before) or "no memory" (just crashed before).
2014-10-26 23:22:53 +01:00
Philipp Wiesemann 30d6cec1bb Added handling of NULL as input for SDL_GameControllerMapping().
For consistency with the similar functions getting SDL_GameController as input.
Also NULL is no SDL_GameController and therefore can not have a mapping anyway.
2014-10-26 17:53:16 +01:00
Philipp Wiesemann 90387dafb4 Removed two wrong documentation comments from gamecontroller source.
No replacement because correct documentation is already in SDL_gamecontroller.h.
2014-10-26 17:46:11 +01:00
Philipp Wiesemann 0a053ed66a Fixed wording in SDL_GameControllerAddMappingsFromRW() error message. 2014-10-26 17:44:00 +01:00
David Ludwig 01f3498c33 WinRT: more keyboard code cleanups
- made keycode listings a bit easier to read
- listed VK_ keycode names, where appropriate
- removed a few pieces of dead + commented-out code
- applied a common 'WINRT_' prefix to internal function names
2014-10-26 12:33:10 -04:00
David Ludwig e057c7dd12 WinRT: Fixed bug whereby key-detection code could call SDL_Log 2014-10-25 08:54:23 -04:00
David Ludwig ed2fff6bef WinRT: fallback to scancode key detection, if VirtualKey/VK detection fails 2014-10-25 08:50:41 -04:00
David Ludwig 20b19aac86 WinRT: more keyboard code cleanups
- use SDL_arraysize where appropriate
- made long lines of debug-logging code span multiple lines, for easier reading
2014-10-25 08:43:51 -04:00
David Ludwig a1bac50d1b WinRT: Fixed bug whereby a right-shift key might get reported as left-shift 2014-10-24 22:09:47 -04:00
David Ludwig e9c79620df WinRT: minor keyboard code cleanup
An internally-used hash table was replaced with a plain switch statement.
2014-10-24 21:25:21 -04:00
Philipp Wiesemann d5d3721b4d Added new key codes from Android 4.4 (API 20) and 5.0 (API 21). 2014-10-24 19:50:29 +02:00
Brandon Schaefer a1dcebb209 Remove unused variable. 2014-10-24 06:52:54 -07:00
Brandon Schaefer 04dbc4920e Merge patch for bug 2750. Thanks Sylvain! 2014-10-24 06:50:09 -07:00
Philipp Wiesemann 1745116fe8 Fixed bug 2759 - Android findLibrary() returns NULL
Sylvain

extra patch with minor modifications:
- typo
- cancel-able set to false
- add the error message, so that the user can report it.
2014-10-24 11:53:34 +02:00
Alex Szpakowski d89620a809 Removed the codepath that gets compiled if IPHONE_TOUCH_EFFICIENT_DANGEROUS is not defined.
The "dangerous" codepath relies on the fact that UITouch objects are persistent for the entire touch sequence, which is always guaranteed by Apple.
2014-10-24 04:06:45 -03:00
Alex Szpakowski a0481bb10c Completely removed custom splash screen code. iOS 8 introduced yet another official way to do launch images (via a Storyboard), and the custom splash screen code was broken on newer devices and caused bugs for all devices anyway. 2014-10-24 03:56:34 -03:00
Philipp Wiesemann bc382e390a Added an option to define libraries to be loaded on Android in a derived class.
This way it is no more needed to modify SDLActivity.java to add own libraries.
2014-10-23 16:45:18 +02:00
Philipp Wiesemann 775a802627 Fixed alert dialog for not loaded libraries on Android being cancelable.
If the alert dialog could be canceled the Activity would not be finished here.
Also setting the property to "true" would be redundant because that is default.
2014-10-23 16:41:01 +02:00
Philipp Wiesemann 425a06a9ea Fixed missing @Override annotation warning in source for Android. 2014-10-23 16:39:15 +02:00
Philipp Wiesemann 4a67627e8b Fixed upper case button in alert dialog for not loaded libraries on Android.
This is more consistent with the buttons of other dialogs on Android.
2014-10-23 16:38:03 +02:00
Philipp Wiesemann d4bdd2469f Fixed typo in message of alert dialog for not loaded libraries on Android. 2014-10-23 16:34:48 +02:00
Philipp Wiesemann 391c31cf06 Fixed writing new errors to standard output instead of error output on Android. 2014-10-23 16:33:27 +02:00