Commit graph

1443 commits

Author SHA1 Message Date
Sam Lantinga
7ee8dda270 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Philipp Wiesemann
410efa90a8 Added brackets to function names in header comments so doxygen links them. 2016-01-01 17:39:55 +01:00
Alex Szpakowski
1c47d39ad1 Updated some header comments and iOS documentation to better clarify high-dpi / retina support and screen-coordinate sizes versus pixel sizes. 2015-12-31 21:16:43 -04:00
Ryan C. Gordon
54ded44867 CMake: Changes to get CMake project to work with Android (thanks, Martin!).
Fixes Bugzilla #3194.

(but note that Bugzilla #3200 still needs to be resolved to get this really
going on Android, at a minimum.)
2015-12-29 00:57:24 -05:00
Philipp Wiesemann
23adb84a3e Pandora: Fixed deactivating no more available CD-ROM support in config header. 2015-12-07 21:41:55 +01:00
David Ludwig
028a80e83b WinRT: added Win10/UWP (Universal Windows Platform) support
"UWP" appears to be Microsoft's new name for WinRT/Windows-Store APIs.

This set of changes updates SDL's WinRT backends to support the Win10 flavor
of WinRT.  It has been tested on Win10 on a desktop.  In theory, it should
also support Win10 on other devices (phone, Xbox One, etc.), however further
patches may be necessary.

This adds:
- a set of MSVC 2015 project files, for use in creating UWP apps
- modifications to various pieces of SDL, in order to compile via MSVC 2015 +
  the Win10 API set
- enables SDL_Window resizing and programmatic-fullscreen toggling, when using
  the WinRT backend
- WinRT README updates
2015-11-29 19:33:11 -05:00
David Ludwig
c858ba8394 WinRT: bug-fix - SDL_SetThreadPriority() didn't work on WinRT 8.x platforms
WinRT 8.0 (Phone and non-Phone) didn't offer an API to set an already-created
thread's priority.  WinRT 8.1 offered this API, along with several other
Win32 thread functions that were previously unavailable (in WinRT).

This change makes WinRT 8.1+ platforms use SDL's Win32 backend.
2015-11-26 13:51:03 -05:00
David Ludwig
3f86649e74 WinRT: lots of display and windowing related fixes
This change-set fixes a lot of windowing related bugs, especially with
regards to Windows 8.x apps running on Windows 10 (which was the driver for
this work).  The primary fixes include:
* listed display modes were wrong, especially when launching apps into a
  non-fullscreen space
* reported window flags were often wrong, especially on Windows 10
* fullscreen/windowed mode switches weren't failing (they are not
  programmatically possible in Win 8.x apps).
2015-11-26 00:41:39 -05:00
Ryan C. Gordon
e47eab0ac9 Minor whitespace fix. 2015-11-14 14:53:44 -05:00
Ryan C. Gordon
03cb578e6e Added SDL_JoystickFromInstanceID() and SDL_GameControllerFromInstanceID().
--HG--
extra : amend_source : 110a5505509ddb9ecafed75abd89602986a99696
2015-11-14 12:35:45 -05:00
Sam Lantinga
9b526d28cb Add SDL_HINT_VIDEO_X11_NET_WM_PING to allow disabling
_NET_WM_PING protocol handling in CreateWindow if
desired.
2015-10-27 11:18:04 -07:00
Sam Lantinga
15b44dadf7 Add a new SDL_KEYMAPCHANGED SDL event to abstract notification of keyboard layout or input language changes. 2015-10-27 11:17:32 -07:00
Sam Lantinga
bf785c766b SDL - added new SDL_JoystickCurrentPowerLevel() API that returns the battery level of the selected joystick. Currently only implemented for XInput devices, other platforms are a TODO.
CR: Sam
2015-09-30 15:39:30 -07:00
Alex Szpakowski
0023cbb086 Added initial support for MFi game controllers on iOS. 2015-09-20 23:08:36 -03:00
Philipp Wiesemann
374505fcdb Android: Added to APK expansion file hint documentation in header file. 2015-09-17 22:21:12 +02:00
Philipp Wiesemann
56e17dd71f Corrected documentation of the SDL_CreateTexture() functions in header file. 2015-08-21 23:50:59 +02:00
Alex Szpakowski
3ee7f4d0c5 Updated SDL_egl.h to have the latest EGL version and extension information. 2015-08-21 00:19:36 -03:00
Philipp Wiesemann
9fb5a1fb89 Corrected documentation of SDL_AddTimer() in header file. 2015-08-19 22:29:37 +02:00
andrewb@andrewb-linux.valvesoftware.com
9f0c34896d Add SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 to SDL so that Reborn can keep running through Alt+F4. 2015-08-03 11:37:03 -07:00
Philipp Wiesemann
f565d64e86 Fixed documentation of SDL_DropEvent in header file. 2015-07-31 20:16:18 +02:00
Alfred Reynolds
fd04003739 SDL
- add a new SDL_HINT_MAC_BACKGROUND_APP hint, when set or set to 1 don't force the app to be foreground
2015-07-29 17:19:15 -07:00
Alfred Reynolds
e26124316e Add SDL_GetDisplayDPI routine and implement for Windows. 2015-07-29 17:18:56 -07:00
Alex Szpakowski
d81533aeed Added MSAA support for OpenGL ES contexts on iOS.
Note that extra steps must be taken when using glReadPixels to read the contents of the main OpenGL ES framebuffer on iOS, if multisampling is used. See the OpenGL ES section of README-ios.md for details.
2015-07-19 19:44:40 -03:00
Ryan C. Gordon
0a790ca20c SDL_WarpMouseGlobal() should return non-void.
There are platforms it isn't implemented on (and currently can't be
implemented on!), and there's currently no way for an app to know this.

This shouldn't break ABI on apps that moved to a revision between 2.0.3 and
2.0.4.

--HG--
extra : rebase_source : 289ffe9b7b92eb812f3d1421c52a561d0d37b717
2015-07-17 21:03:58 -04:00
Philipp Wiesemann
b032dd985f Fixed spaces in header file. 2015-07-16 21:48:35 +02:00
Philipp Wiesemann
b7e03d261f Fixed typo in test header file comment. 2015-07-15 21:12:04 +02:00
Sam Lantinga
e144065e28 Android has clock_gettime() - thanks Michael Labbe! 2015-06-19 23:40:23 -07:00
Ryan C. Gordon
c6c3f10445 Removed Edgar's name from SDL_haptic.h at his request.
--HG--
extra : rebase_source : 908ec7e72e9a1320ae5e6b15f32a991df5d22eb8
2015-06-17 12:59:12 -04:00
Sam Lantinga
b15e71afdc Partial fix for bug 2758 - Android issues with NDK r10c and API-21
Sylvain

When using API 21 and running on an old device (android < 5.0 ?) some function are missing.

functions are (at least) : signal, sigemptyset, atof, stpcpy (strcat and strcpy), srand, rand.


Very few modifications on SDL to get this working :

on SDL
======

Undefine android configuration :

HAVE_SIGNAL
HAVE_SIGACTION
HAVE_ATOF

In "SDL_systrhead.c", comment out the few block of lines with "sigemptyset".

Android.mk:
remove the compilation of "test" directory because it contains a few rand/srand calls

Also, there are more discussions about this in internet :
https://groups.google.com/forum/#!topic/android-ndk/RjO9WmG9pfE
http://stackoverflow.com/questions/25475055/android-ndk-load-library-cannot-locate-srand
2015-06-17 00:07:45 -07:00
Sam Lantinga
6c13c2bf5c Fixed bug 3009 - Cannot compile SDL2 on Windows
CMakeLists.txt was missing handling for running CMake with -DDIRECTX=0
2015-06-13 10:47:55 -07:00
Ryan C. Gordon
ce5063420d configure/cmake/x11: Removed SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 test.
This was the only thing that made SDL_config.h generate differently between
32 and 64-bit versions of Linux, so instead we force a function cast in our
X11 code to match our dynamic loader version, which removes the compile error
on some machines that prompted this test in the first place.

Xlib never wrote to this data, so if you're on an older Xlib where this param
wasn't const, your data should still be intact when we force the caller to
think it was actually const after all.

Fixes Bugzilla #1893.
2015-06-08 01:13:51 -04:00
Philipp Wiesemann
94fac461b4 Fixed comments at conditional compilation macro in header file. 2015-06-05 19:41:34 +02:00
Ryan C. Gordon
f7c1221947 Fixed SDL_ISPIXELFORMAT_ALPHA to check pixel orders that match pixel type.
Otherwise, SDL_PIXELFORMAT_BGR24 is reported as having alpha, because
 its SDL_ARRAYORDER_BGR pixel order uses the same integer value as
 SDL_PACKEDORDER_RGBA, since we weren't checking the pixel type to
 differentiate.

Fixes Bugzilla #2977.
2015-05-31 01:45:20 -04:00
Philipp Wiesemann
d183a00458 Fixed typo in header file documentation comment. 2015-05-29 22:24:38 +02:00
Ryan C. Gordon
b007cfea84 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
6ff4d48902 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
12bbb8e161 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
8ff2462ace Properly report DX headers in the CMake project files (thanks, "MailMr_S"!).
Fixes Bugzilla #2900.
2015-05-26 21:09:48 -04:00
Ryan C. Gordon
2102ee2bb9 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.

--HG--
extra : histedit_source : 3d62ff645cec83943bb96888bdf43415c19228ef
2015-05-26 16:25:22 -04:00
Sam Lantinga
56b58afdbe Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Alex Szpakowski
58e77377c6 iOS: Added support for SDL_DisableScreenSaver and SDL_EnableScreenSaver. 2015-05-16 16:55:56 -03:00
Sam Lantinga
a891967b73 Added a userdata parameter to SDL_SetWindowsMessageHook() 2015-05-13 22:39:32 -07:00
Sam Lantinga
51bfd9328e Added SDL_SetWindowsMessageHook() to facilitate full IME support on Windows 2015-05-13 22:39:20 -07:00
Philipp Wiesemann
b3830cc285 Fixed SDL_TouchFingerEvent documentation in header file. 2015-05-08 21:53:02 +02: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
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
Alex Szpakowski
58fb5ed781 Added framebuffer and colorbuffer members to the uikit portion of the SDL_SysWMinfo struct, removed SDL_iOSGetViewRenderbuffer and SDL_iOSGetViewFramebuffer.
--HG--
branch : iOS-improvements
2015-04-09 19:28:00 -03:00
Alex Szpakowski
d7781e2eff Renamed SDL_iPhoneGetViewFramebuffer/Renderbuffer to SDL_iOSGetViewFramebuffer/Renderbuffer. Added #defines for SDL_iOSSetAnimationCallback and SDL_iOSSetEventPump, which point to SDL_iPhoneSetAnimationCallback and SDL_iPhoneSetEventPump.
--HG--
branch : iOS-improvements
2015-04-08 15:59:29 -03:00