Made helper window creation depend on initializing the Haptics or Joystick subsystems.
authorSam Lantinga <slouken@libsdl.org>
Fri, 08 Nov 2013 14:05:15 -0800
changeset 7918934f1630a86f
parent 7917 686df9c2b98a
child 7919 cca061ef94a4
Made helper window creation depend on initializing the Haptics or Joystick subsystems.
src/SDL.c
     1.1 --- a/src/SDL.c	Fri Nov 08 14:05:08 2013 -0800
     1.2 +++ b/src/SDL.c	Fri Nov 08 14:05:15 2013 -0800
     1.3 @@ -115,9 +115,11 @@
     1.4      SDL_ClearError();
     1.5  
     1.6  #if SDL_VIDEO_DRIVER_WINDOWS
     1.7 -    if (SDL_HelperWindowCreate() < 0) {
     1.8 -        return -1;
     1.9 -    }
    1.10 +	if ((flags & (SDL_INIT_HAPTIC|SDL_INIT_JOYSTICK))) {
    1.11 +		if (SDL_HelperWindowCreate() < 0) {
    1.12 +			return -1;
    1.13 +		}
    1.14 +	}
    1.15  #endif
    1.16  
    1.17  #if !SDL_TIMERS_DISABLED