diff --git a/main.py b/main.py index a3043c7..5ebebd4 100644 --- a/main.py +++ b/main.py @@ -42,13 +42,15 @@ async def save_controller_settings(self, controller, currentGameId): settings.set_setting('controllerPerGameProfilesEnabled', controllerPerGameProfilesEnabled) result = settings.set_all_controller_profiles(controllerProfiles) - # sync settings.json to actual controller hardware - if currentGameId: - controllers.sync_controller_profile_settings(currentGameId) - # sync touchpad - controllers.sync_touchpad(currentGameId) - # sync gyros - controllers.sync_gyros(currentGameId) + # double-sync just in case the first one doesn't register + for i in range(2): + # sync settings.json to actual controller hardware + if currentGameId: + controllers.sync_controller_profile_settings(currentGameId) + # sync touchpad + controllers.sync_touchpad(currentGameId) + # sync gyros + controllers.sync_gyros(currentGameId) return result async def save_rgb_settings(self, rgbProfiles, currentGameId):