For gamepads that don't have their own sensors, try to use the system sensors.
This allows using the gyro and accelerometer in handheld devices in conjunction with built-in or wraparound controllers.
This commit is contained in:
parent
d584592822
commit
42e4639a5e
8 changed files with 272 additions and 11 deletions
|
@ -504,6 +504,11 @@ int SDL_SendSensorUpdate(Uint64 timestamp, SDL_Sensor *sensor, Uint64 sensor_tim
|
|||
return posted;
|
||||
}
|
||||
|
||||
void SDL_UpdateSensor(SDL_Sensor *sensor)
|
||||
{
|
||||
sensor->driver->Update(sensor);
|
||||
}
|
||||
|
||||
void SDL_UpdateSensors(void)
|
||||
{
|
||||
int i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue