mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-28 07:29:09 +00:00
Renamed functions to get information from device IDs
Fixes https://github.com/libsdl-org/SDL/issues/10237
This commit is contained in:
parent
933f2fc239
commit
e90060d07f
20 changed files with 235 additions and 229 deletions
|
@ -91,11 +91,11 @@ int main(int argc, char **argv)
|
|||
for (i = 0; i < num_sensors; ++i) {
|
||||
SDL_Log("Sensor %" SDL_PRIu32 ": %s, type %s, platform type %d\n",
|
||||
sensors[i],
|
||||
SDL_GetSensorInstanceName(sensors[i]),
|
||||
GetSensorTypeString(SDL_GetSensorInstanceType(sensors[i])),
|
||||
SDL_GetSensorInstanceNonPortableType(sensors[i]));
|
||||
SDL_GetSensorNameFromID(sensors[i]),
|
||||
GetSensorTypeString(SDL_GetSensorTypeFromID(sensors[i])),
|
||||
SDL_GetSensorNonPortableTypeFromID(sensors[i]));
|
||||
|
||||
if (SDL_GetSensorInstanceType(sensors[i]) != SDL_SENSOR_UNKNOWN) {
|
||||
if (SDL_GetSensorTypeFromID(sensors[i]) != SDL_SENSOR_UNKNOWN) {
|
||||
SDL_Sensor *sensor = SDL_OpenSensor(sensors[i]);
|
||||
if (!sensor) {
|
||||
SDL_Log("Couldn't open sensor %" SDL_PRIu32 ": %s\n", sensors[i], SDL_GetError());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue