fix SDL_GetSensorInstanceID() return code upon failure.
Reference issue: https://github.com/libsdl-org/SDL/issues/7051
This commit is contained in:
parent
0621a67350
commit
85924687fd
2 changed files with 2 additions and 2 deletions
|
@ -374,7 +374,7 @@ int SDL_GetSensorNonPortableType(SDL_Sensor *sensor)
|
|||
SDL_SensorID SDL_GetSensorInstanceID(SDL_Sensor *sensor)
|
||||
{
|
||||
if (!SDL_IsSensorValid(sensor)) {
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return sensor->instance_id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue