summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/SDL2/src/SDL.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-11-16 16:26:13 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2016-11-16 16:28:01 +0100
commit47a05778bff9388fc6c479461dd3804c79d7b539 (patch)
treebb3d4dc8df676b8aa478339b3fd0cd305dc4ac4d /3rdparty/SDL2/src/SDL.c
parente61b392edfbfe5b9d70908c087632da915a3abd8 (diff)
Updated SDL2 to 2.0.5 (nw)
Diffstat (limited to '3rdparty/SDL2/src/SDL.c')
-rw-r--r--3rdparty/SDL2/src/SDL.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/3rdparty/SDL2/src/SDL.c b/3rdparty/SDL2/src/SDL.c
index 5d310021a50..9eef00cd346 100644
--- a/3rdparty/SDL2/src/SDL.c
+++ b/3rdparty/SDL2/src/SDL.c
@@ -115,6 +115,16 @@ SDL_InitSubSystem(Uint32 flags)
/* Clear the error message */
SDL_ClearError();
+ if ((flags & SDL_INIT_GAMECONTROLLER)) {
+ /* game controller implies joystick */
+ flags |= SDL_INIT_JOYSTICK;
+ }
+
+ if ((flags & (SDL_INIT_VIDEO|SDL_INIT_JOYSTICK))) {
+ /* video or joystick implies events */
+ flags |= SDL_INIT_EVENTS;
+ }
+
#if SDL_VIDEO_DRIVER_WINDOWS
if ((flags & (SDL_INIT_HAPTIC|SDL_INIT_JOYSTICK))) {
if (SDL_HelperWindowCreate() < 0) {
@@ -127,16 +137,6 @@ SDL_InitSubSystem(Uint32 flags)
SDL_TicksInit();
#endif
- if ((flags & SDL_INIT_GAMECONTROLLER)) {
- /* game controller implies joystick */
- flags |= SDL_INIT_JOYSTICK;
- }
-
- if ((flags & (SDL_INIT_VIDEO|SDL_INIT_JOYSTICK))) {
- /* video or joystick implies events */
- flags |= SDL_INIT_EVENTS;
- }
-
/* Initialize the event subsystem */
if ((flags & SDL_INIT_EVENTS)) {
#if !SDL_EVENTS_DISABLED
@@ -443,6 +443,8 @@ SDL_GetPlatform()
return "Windows";
#elif __WINRT__
return "WinRT";
+#elif __TVOS__
+ return "tvOS";
#elif __IPHONEOS__
return "iOS";
#elif __PSP__