mirror of https://github.com/encounter/SDL.git
Added an SDL error to SDL_GameControllerMapping* functions
This commit is contained in:
parent
9f30d4981e
commit
24f97dd700
|
@ -1614,6 +1614,8 @@ SDL_GameControllerMappingForIndex(int mapping_index)
|
|||
return CreateMappingString(mapping, mapping->guid);
|
||||
}
|
||||
--mapping_index;
|
||||
} else {
|
||||
SDL_SetError("Mapping not available");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1627,6 +1629,8 @@ SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid)
|
|||
ControllerMapping_t *mapping = SDL_PrivateGetControllerMappingForGUID(guid, SDL_FALSE);
|
||||
if (mapping) {
|
||||
return CreateMappingString(mapping, guid);
|
||||
} else {
|
||||
SDL_SetError("Mapping not available");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue