Sensor in Joystick.

This commit is contained in:
Miku AuahDark
2022-12-05 23:09:50 +08:00
parent bdbd4a9a58
commit 0442128006
6 changed files with 191 additions and 0 deletions
+13
View File
@@ -156,6 +156,19 @@ Sensor::SensorType Sensor::convert(SDL_SensorType type)
}
}
SDL_SensorType Sensor::convert(Sensor::SensorType type)
{
switch (type)
{
case SENSOR_ACCELEROMETER:
return SDL_SENSOR_ACCEL;
case SENSOR_GYROSCOPE:
return SDL_SENSOR_GYRO;
default:
return SDL_SENSOR_UNKNOWN;
}
}
}
}
}