Forráskód Böngészése

Map the right pad on the Steam Controller to the right stick in the game controller API

Sam Lantinga 5 éve
szülő
commit
212609b3f2
1 módosított fájl, 2 hozzáadás és 0 törlés
  1. 2 0
      src/joystick/hidapi/SDL_hidapi_steam.c

+ 2 - 0
src/joystick/hidapi/SDL_hidapi_steam.c

@@ -1122,6 +1122,8 @@ HIDAPI_DriverSteam_UpdateDevice(SDL_HIDAPI_Device *device)
 
             SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, ctx->m_state.sLeftStickX);
             SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTY, ~ctx->m_state.sLeftStickY);
+            SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTX, ctx->m_state.sRightPadX);
+            SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_RIGHTY, ~ctx->m_state.sRightPadY);
 
             ctx->m_last_state = ctx->m_state;
         }