mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-20 15:02:20 +00:00
simplified SDL_GameControllerAddMappingsFromFile code
This commit is contained in:
parent
ec13b6f0f6
commit
d4f311da36
1 changed files with 3 additions and 5 deletions
|
|
@ -345,11 +345,9 @@ void hid::Init()
|
|||
|
||||
SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER);
|
||||
|
||||
// Load SDL_GameControllerDB mappings from file
|
||||
const char* mappingFile = "gamecontrollerdb.txt";
|
||||
int mappingsAdded = SDL_GameControllerAddMappingsFromFile(mappingFile);
|
||||
if (mappingsAdded > 0) {
|
||||
LOGFN("Loaded {} controller mapping(s) from SDL_GameControllerDB file", mappingsAdded, mappingFile);
|
||||
// Load controller mappings from SDL_GameControllerDB
|
||||
if (int mappings = SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt"); mappings > 0) {
|
||||
LOGFN("Loaded {} controller mappings", mappings);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue