소스 검색

Made helper window creation depend on initializing the Haptics or Joystick subsystems.

Sam Lantinga 12 년 전
부모
커밋
3523b409bc
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      src/SDL.c

+ 5 - 3
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