Browse Source

Don't mess with the state of the Motion Plus extension on Linux

Sam Lantinga 2 years ago
parent
commit
87f8b6ff0f
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/joystick/hidapi/SDL_hidapi_wii.c

+ 6 - 0
src/joystick/hidapi/SDL_hidapi_wii.c

@@ -463,9 +463,15 @@ static void CheckMotionPlusConnection(SDL_DriverWii_Context *ctx)
 
 static void ActivateMotionPlusWithMode(SDL_DriverWii_Context *ctx, Uint8 mode)
 {
+#if defined(__LINUX__)
+    /* Linux drivers maintain a lot of state around the Motion Plus
+     * extension, so don't mess with it here.
+     */
+#else
     WriteRegister(ctx, 0xA600FE, &mode, sizeof(mode), SDL_TRUE);
 
     ctx->m_ucMotionPlusMode = mode;
+#endif /* LINUX */
 }
 
 static void ActivateMotionPlus(SDL_DriverWii_Context *ctx)