summaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-08-12 18:18:19 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-08-12 18:18:19 +0200
commitedc0571c96088584685dd7f4d91be773b2a12a03 (patch)
tree52bf28fc3de908cf828be105afbe5b57efa04534 /platform
parent47d0bdd5584e53e2c77a57972708ea3fcb468ff7 (diff)
parentd1047f4c46145eb68e0ef87a39f0d80502781207 (diff)
downloadredot-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.mm5
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];
}