mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-30 02:33:03 +02: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";
|
win.title = @"Keybindings";
|
||||||
[s setWindow:win];
|
[s setWindow:win];
|
||||||
[win makeKeyAndOrderFront:self];
|
[win makeKeyAndOrderFront:self];
|
||||||
|
[s checkController];
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -491,6 +491,10 @@ if (!data.config.kbActionNames.value.empty()) bindingNames[@(Input::code)] = \
|
||||||
src.enabled = true;
|
src.enabled = true;
|
||||||
isListening = true;
|
isListening = true;
|
||||||
|
|
||||||
|
[self checkController];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)checkController {
|
||||||
NSArray<GCController*>* controllers = [GCController controllers];
|
NSArray<GCController*>* controllers = [GCController controllers];
|
||||||
if (controllers.count <= 0) return;
|
if (controllers.count <= 0) return;
|
||||||
GCController *gamepad = controllers[0];
|
GCController *gamepad = controllers[0];
|
||||||
|
|
Loading…
Add table
Reference in a new issue