Fix some gamepads working for UI navigation but not in game

This commit is contained in:
Cameron Gutman committed 2019-01-29 22:01:05 -08:00
1 parent 8bb6d4d0d9
commit 2986a40c5a
2 files changed
+23 -3

No files matched your search

+5
View File
@@ -254,6 +254,11 @@ int SdlGamepadKeyNavigation::getConnectedGamepads()
return 0;
}
// Applying mappings is necessary to ensure gamepad without
// a built-in mapping are properly counted.
MappingManager mappingManager;
mappingManager.applyMappings();
int count = 0;
for (int i = 0; i < SDL_NumJoysticks(); i++) {
if (SDL_IsGameController(i)) {