jazz2-native
jazz2-native copied to clipboard
Loading gamepad mappings from gamecontrollerdb.txt
Jazz² Resurrection version
Latest GIT code
Problem or limitation
Hi there,
SDL2 support a finite number of gamepads on it's database.
In order to use gamepads not included in SDL2 database, what other engines do is calling:
SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt")
before this typical call:
SDL_GameControllerOpen(0);
...which in Jazz2 seems to be done here: https://github.com/deathkiller/jazz2-native/blob/8d4a73fe9f1dfb2f4231cba8595e12777950cbbf/Sources/nCine/Backends/ImGuiSdlInput.cpp#L477
However, adding SDL_GameControllerAddMappingsFromFile("gamecontrollerdb.txt")
there seems a bit strange, because it seems to be part of imgui. I mean, should I do it here or in imgui repository?
Proposed solution
Purposed solution is above, but I am not sure it's correct.