Explorar el Código

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

Sam Lantinga hace 6 años
padre
commit
212609b3f2
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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;
         }