Introduce game controller db

This commit is contained in:
SimoneN64
2024-05-19 09:25:06 +02:00
parent 2ebda70a8c
commit 8cb30838ed

View File

@@ -14,6 +14,10 @@ EmuThread::EmuThread(std::unique_ptr<QtInstanceFactory>&& instance_, std::unique
SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER); SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER);
bool controllerConnected = false; bool controllerConnected = false;
if(SDL_GameControllerAddMappingsFromFile("resources/gamecontrollerdb.txt") < 0) {
Util::warn("[SDL] Could not load game controller DB");
}
auto pollEvents = [&]() { auto pollEvents = [&]() {
SDL_Event e; SDL_Event e;
while(SDL_PollEvent(&e)) { while(SDL_PollEvent(&e)) {