From 3523b409bc1f0bd52bf5de093ac8000c4442660c Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 8 Nov 2013 14:05:15 -0800 Subject: [PATCH] Made helper window creation depend on initializing the Haptics or Joystick subsystems. --- src/SDL.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/SDL.c b/src/SDL.c index 0f6de9fe61490..a59fe2cc1e5e7 100644 --- a/src/SDL.c +++ b/src/SDL.c @@ -115,9 +115,11 @@ SDL_InitSubSystem(Uint32 flags) SDL_ClearError(); #if SDL_VIDEO_DRIVER_WINDOWS - if (SDL_HelperWindowCreate() < 0) { - return -1; - } + if ((flags & (SDL_INIT_HAPTIC|SDL_INIT_JOYSTICK))) { + if (SDL_HelperWindowCreate() < 0) { + return -1; + } + } #endif #if !SDL_TIMERS_DISABLED