summaryrefslogtreecommitdiffstats
path: root/platform/macos
diff options
context:
space:
mode:
Diffstat (limited to 'platform/macos')
-rw-r--r--platform/macos/joypad_macos.mm5
-rw-r--r--platform/macos/os_macos.h1
-rw-r--r--platform/macos/os_macos.mm12
3 files changed, 2 insertions, 16 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];
}
diff --git a/platform/macos/os_macos.h b/platform/macos/os_macos.h
index df3a4009a3..303fc112bf 100644
--- a/platform/macos/os_macos.h
+++ b/platform/macos/os_macos.h
@@ -109,7 +109,6 @@ public:
virtual String get_executable_path() const override;
virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) override;
virtual Error create_instance(const List<String> &p_arguments, ProcessID *r_child_id = nullptr) override;
- virtual Error kill(const ProcessID &p_pid) override;
virtual bool is_process_running(const ProcessID &p_pid) const override;
virtual String get_unique_id() const override;
diff --git a/platform/macos/os_macos.mm b/platform/macos/os_macos.mm
index 495246344b..3a82514766 100644
--- a/platform/macos/os_macos.mm
+++ b/platform/macos/os_macos.mm
@@ -675,18 +675,6 @@ bool OS_MacOS::is_process_running(const ProcessID &p_pid) const {
return ![app isTerminated];
}
-Error OS_MacOS::kill(const ProcessID &p_pid) {
- NSRunningApplication *app = [NSRunningApplication runningApplicationWithProcessIdentifier:(pid_t)p_pid];
- if (!app) {
- return OS_Unix::kill(p_pid);
- }
- bool terminated = [app terminate];
- if (!terminated) {
- terminated = [app forceTerminate];
- }
- return terminated ? OK : ERR_INVALID_PARAMETER;
-}
-
String OS_MacOS::get_unique_id() const {
static String serial_number;