From 6be48a4942ce9f1204c10d351a1ebebced4cdce3 Mon Sep 17 00:00:00 2001 From: Struma Date: Wed, 10 May 2023 14:50:54 -0400 Subject: [PATCH] Fix setting controller bindings not working only the first time --- macos/views/SettingsMenuController.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/macos/views/SettingsMenuController.mm b/macos/views/SettingsMenuController.mm index 9b0a81e3..9d219e71 100644 --- a/macos/views/SettingsMenuController.mm +++ b/macos/views/SettingsMenuController.mm @@ -84,7 +84,7 @@ typedef NSMutableArray BindingIndexArray; win.title = @"Keybindings"; [s setWindow:win]; [win makeKeyAndOrderFront:self]; - + [s checkController]; return s; } @@ -491,6 +491,10 @@ if (!data.config.kbActionNames.value.empty()) bindingNames[@(Input::code)] = \ src.enabled = true; isListening = true; + [self checkController]; +} + +- (void)checkController { NSArray* controllers = [GCController controllers]; if (controllers.count <= 0) return; GCController *gamepad = controllers[0];