summaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2024-08-12 14:08:34 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2024-08-12 14:09:18 +0300
commitd1047f4c46145eb68e0ef87a39f0d80502781207 (patch)
tree15b7266d96964e87362265d42abac950ba8d75c4 /platform
parent88f3b5f9d52f740b24fabfb8bc01b8b7026ba279 (diff)
downloadredot-engine-d1047f4c46145eb68e0ef87a39f0d80502781207.tar.gz
[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];
}