浏览代码

The Google Pixel fingerprint sensor isn't actually a joystick

Fixes https://github.com/libsdl-org/SDL/issues/4971
Sam Lantinga 3 年之前
父节点
当前提交
a2e8565230
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      src/joystick/SDL_gamecontroller.c

+ 7 - 0
src/joystick/SDL_gamecontroller.c

@@ -1820,6 +1820,13 @@ SDL_bool SDL_ShouldIgnoreGameController(const char *name, SDL_JoystickGUID guid)
     }
 #endif
 
+#if defined(__ANDROID__)
+    if (name && SDL_strcmp(name, "uinput-fpc") == 0) {
+        /* The Google Pixel fingerprint sensor reports itself as a joystick */
+        return SDL_TRUE;
+    }
+#endif
+
     if (SDL_allowed_controllers.num_entries == 0 &&
         SDL_ignored_controllers.num_entries == 0) {
         return SDL_FALSE;