fix: no estava carregant gamecontrollerdb.txt

This commit is contained in:
2026-04-05 17:50:07 +02:00
parent 6570415ed0
commit b0209c8220

View File

@@ -42,6 +42,12 @@ namespace Gamepad {
SDL_Log("No s'ha pogut inicialitzar SDL_INIT_GAMEPAD: %s", SDL_GetError()); SDL_Log("No s'ha pogut inicialitzar SDL_INIT_GAMEPAD: %s", SDL_GetError());
return; return;
} }
int added = SDL_AddGamepadMappingsFromFile("gamecontrollerdb.txt");
if (added < 0) {
SDL_Log("No s'ha pogut carregar gamecontrollerdb.txt: %s", SDL_GetError());
} else {
SDL_Log("Carregats %d mappings de gamepad", added);
}
openFirstGamepad(); openFirstGamepad();
} }