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
812
812
}
813
813
814
814
if (ctx -> sensors_supported ) {
815
+ // Standard DualSense sensor update rate is 250 Hz over USB
816
+ float update_rate = 250.0f ;
817
+
815
818
if (ctx -> device -> is_bluetooth ) {
816
819
// 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 ;
822
824
}
825
+
826
+ SDL_PrivateJoystickAddSensor (ctx -> joystick , SDL_SENSOR_GYRO , update_rate );
827
+ SDL_PrivateJoystickAddSensor (ctx -> joystick , SDL_SENSOR_ACCEL , update_rate );
823
828
}
824
829
825
830
ctx -> report_battery = true;
You can’t perform that action at this time.
0 commit comments