Merge pull request #95425 from bruvzg/macos_joypad_queue

[macOS] Fix wrong object type in joypad queue.
This commit is contained in:
Rémi Verschelde 2024-08-12 18:18:19 +02:00
commit edc0571c96
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 3 deletions

View File

@ -228,7 +228,7 @@ void JoypadMacOS::joypad_vibration_stop(Joypad *p_joypad, uint64_t p_timestamp)
@property(assign, nonatomic) BOOL isObserving;
@property(assign, nonatomic) BOOL isProcessing;
@property(strong, nonatomic) NSMutableDictionary<NSNumber *, Joypad *> *connectedJoypads;
@property(strong, nonatomic) NSMutableArray<Joypad *> *joypadsQueue;
@property(strong, nonatomic) NSMutableArray<GCController *> *joypadsQueue;
@end
@ -364,8 +364,7 @@ void JoypadMacOS::joypad_vibration_stop(Joypad *p_joypad, uint64_t p_timestamp)
if ([[self getAllKeysForController:controller] count] > 0) {
print_verbose("Controller is already registered.");
} else if (!self.isProcessing) {
Joypad *joypad = [[Joypad alloc] init:controller];
[self.joypadsQueue addObject:joypad];
[self.joypadsQueue addObject:controller];
} else {
[self addMacOSJoypad:controller];
}