Skip to content

Commit

Permalink
Merge pull request #95425 from bruvzg/macos_joypad_queue
Browse files Browse the repository at this point in the history
[macOS] Fix wrong object type in joypad queue.
  • Loading branch information
akien-mga committed Aug 12, 2024
2 parents 47d0bdd + d1047f4 commit edc0571
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions platform/macos/joypad_macos.mm
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ @interface JoypadMacOSObserver ()
@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

Expand Down Expand Up @@ -364,8 +364,7 @@ - (void)controllerWasConnected:(NSNotification *)notification {
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];
}
Expand Down

0 comments on commit edc0571

Please sign in to comment.