소스 검색

Default SDL_HINT_JOYSTICK_GAMEINPUT to SDL_FALSE

This was causing crashes in IGameInput_RegisterSystemButtonCallback(), presumably on older systems with runtimes using a different function signature. We'll just disable it for now until the GameInput runtime has stabilized and we can tell when it's safe to use.
Sam Lantinga 1 년 전
부모
커밋
fa2c9c46c5
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      include/SDL3/SDL_hints.h
  2. 1 1
      src/joystick/gdk/SDL_gameinputjoystick.c

+ 2 - 2
include/SDL3/SDL_hints.h

@@ -1232,8 +1232,8 @@ extern "C" {
  *
  *
  * The variable can be set to the following values:
  * The variable can be set to the following values:
  *
  *
- * - "0": GameInput is not used.
- * - "1": GameInput is used. (default)
+ * - "0": GameInput is not used. (default)
+ * - "1": GameInput is used.
  *
  *
  * This hint should be set before SDL is initialized.
  * This hint should be set before SDL is initialized.
  *
  *

+ 1 - 1
src/joystick/gdk/SDL_gameinputjoystick.c

@@ -234,7 +234,7 @@ static int GAMEINPUT_JoystickInit(void)
 {
 {
     HRESULT hR;
     HRESULT hR;
 
 
-    if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_GAMEINPUT, true)) {
+    if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_GAMEINPUT, false)) {
         return 0;
         return 0;
     }
     }