瀏覽代碼

Ignore the device version for Atari vcs controllers

At least on bluetooth the guid user the version reported by the
bluetooth device. Which for Atari vcs controllers is the firmware
version. However the mapping will stay the same regardless of firmware
version, so ignore the version entirely to avoid needing a new mapping
entry for each firmware version.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Sjoerd Simons 4 年之前
父節點
當前提交
de4ba6ebc0
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/joystick/linux/SDL_sysjoystick.c

+ 8 - 0
src/joystick/linux/SDL_sysjoystick.c

@@ -127,6 +127,14 @@ FixupDeviceInfoForMapping(int fd, struct input_id *inpid)
             inpid->version = 0x0902;
         }
     }
+
+    /* For Atari vcs modern and classic controllers have the version reflecting
+     * firmware version, but the mapping stays stable so ignore
+     * version information */
+    if (inpid->vendor == 0x3250
+            && (inpid->product == 0x1001 || inpid->product == 0x1002)) {
+        inpid->version = 0;
+    }
 }
 
 #ifdef SDL_JOYSTICK_HIDAPI