Fix some gamepads working for UI navigation but not in game

This commit is contained in:
Cameron Gutman
2019-01-29 22:01:05 -08:00
parent 8bb6d4d0d9
commit 2986a40c5a
2 changed files with 23 additions and 3 deletions
+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)) {