diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-08-12 18:18:19 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-08-12 18:18:19 +0200 |
commit | edc0571c96088584685dd7f4d91be773b2a12a03 (patch) | |
tree | 52bf28fc3de908cf828be105afbe5b57efa04534 /platform | |
parent | 47d0bdd5584e53e2c77a57972708ea3fcb468ff7 (diff) | |
parent | d1047f4c46145eb68e0ef87a39f0d80502781207 (diff) | |
download | redot-engine-edc0571c96088584685dd7f4d91be773b2a12a03.tar.gz |
Merge pull request #95425 from bruvzg/macos_joypad_queue
[macOS] Fix wrong object type in joypad queue.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/macos/joypad_macos.mm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/platform/macos/joypad_macos.mm b/platform/macos/joypad_macos.mm index 8cd5cdd9f2..beb32d9129 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<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]; } |