File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -812,14 +812,19 @@ static void HIDAPI_DriverPS5_SetEnhancedModeAvailable(SDL_DriverPS5_Context *ctx
812812 }
813813
814814 if (ctx -> sensors_supported ) {
815+ // Standard DualSense sensor update rate is 250 Hz over USB
816+ float update_rate = 250.0f ;
817+
815818 if (ctx -> device -> is_bluetooth ) {
816819 // Bluetooth sensor update rate appears to be 1000 Hz
817- SDL_PrivateJoystickAddSensor (ctx -> joystick , SDL_SENSOR_GYRO , 1000.0f );
818- SDL_PrivateJoystickAddSensor (ctx -> joystick , SDL_SENSOR_ACCEL , 1000.0f );
819- } else {
820- SDL_PrivateJoystickAddSensor (ctx -> joystick , SDL_SENSOR_GYRO , 250.0f );
821- SDL_PrivateJoystickAddSensor (ctx -> joystick , SDL_SENSOR_ACCEL , 250.0f );
820+ update_rate = 1000.0f ;
821+ } else if (SDL_IsJoystickDualSenseEdge (ctx -> device -> vendor_id , ctx -> device -> product_id )) {
822+ // DualSense Edge sensor update rate is 1000 Hz over USB
823+ update_rate = 1000.0f ;
822824 }
825+
826+ SDL_PrivateJoystickAddSensor (ctx -> joystick , SDL_SENSOR_GYRO , update_rate );
827+ SDL_PrivateJoystickAddSensor (ctx -> joystick , SDL_SENSOR_ACCEL , update_rate );
823828 }
824829
825830 ctx -> report_battery = true;
You can’t perform that action at this time.
0 commit comments