We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6e3777 commit 79b6e00Copy full SHA for 79b6e00
input/drivers_joypad/sdl_joypad.c
@@ -222,6 +222,18 @@ static void sdl_pad_connect(unsigned id)
222
RARCH_LOG("[SDL] Falling back to joystick rumble.\n");
223
}
224
#endif
225
+#if SDL_SUPPORTS_SENSORS
226
+ if (pad->controller)
227
+ {
228
+ bool has_accel = SDL_GameControllerHasSensor(pad->controller, SDL_SENSOR_ACCEL);
229
+ bool has_gyro = SDL_GameControllerHasSensor(pad->controller, SDL_SENSOR_GYRO);
230
+ if (has_accel || has_gyro)
231
+ RARCH_LOG("[SDL] Pad #%u: found sensors (accel=%s, gyro=%s).\n",
232
+ id,
233
+ has_accel ? "yes" : "no",
234
+ has_gyro ? "yes" : "no");
235
+ }
236
+#endif
237
#else
238
pad->num_axes = SDL_JoystickNumAxes(pad->joypad);
239
pad->num_buttons = SDL_JoystickNumButtons(pad->joypad);
0 commit comments