From d1047f4c46145eb68e0ef87a39f0d80502781207 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:08:34 +0300 Subject: [PATCH] [macOS] Fix wrong object type in joypad queue. --- platform/macos/joypad_macos.mm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platform/macos/joypad_macos.mm b/platform/macos/joypad_macos.mm index 8cd5cdd9f27..beb32d9129c 100644 --- a/platform/macos/joypad_macos.mm +++ b/platform/macos/joypad_macos.mm @@ -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 *connectedJoypads; -@property(strong, nonatomic) NSMutableArray *joypadsQueue; +@property(strong, nonatomic) NSMutableArray *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]; }