mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2024-10-28 11:19:36 +01:00
Fix setting controller bindings not working only the first time
This commit is contained in:
parent
290ffe1135
commit
6be48a4942
1 changed files with 5 additions and 1 deletions
|
@ -84,7 +84,7 @@ typedef NSMutableArray<NSNumber*> 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<GCController*>* controllers = [GCController controllers];
|
||||
if (controllers.count <= 0) return;
|
||||
GCController *gamepad = controllers[0];
|
||||
|
|
Loading…
Reference in a new issue