瀏覽代碼

Disable Windows.Gaming.Input by default

The functionality is already covered by XInput and DirectInput, and Microsoft is recommending GameInput going forward.

Fixes https://github.com/libsdl-org/SDL/issues/13000
Sam Lantinga 5 天之前
父節點
當前提交
78a29d1670
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      include/SDL3/SDL_hints.h
  2. 1 1
      src/joystick/windows/SDL_windows_gaming_input.c

+ 2 - 2
include/SDL3/SDL_hints.h

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

+ 1 - 1
src/joystick/windows/SDL_windows_gaming_input.c

@@ -585,7 +585,7 @@ static bool WGI_JoystickInit(void)
 {
     HRESULT hr;
 
-    if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_WGI, true)) {
+    if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_WGI, false)) {
         return true;
     }