diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-01-17 13:26:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-17 13:26:15 +0100 |
commit | 8bdef23f7f26e085587e3dbcb5063dea2768cc88 (patch) | |
tree | e0a27e16e21a55633fe16ba0392deb21d82f7841 /platform/osx | |
parent | a2d323c67e33b1c965e82b3d59784c80ab4c6950 (diff) | |
parent | ea5bb8b47dce95aa98f47d13ada8297670559c8b (diff) |
Merge pull request #56012 from bruvzg/wt🤎4
Diffstat (limited to 'platform/osx')
-rw-r--r-- | platform/osx/display_server_osx.h | 3 | ||||
-rw-r--r-- | platform/osx/display_server_osx.mm | 9 | ||||
-rw-r--r-- | platform/osx/os_osx.h | 2 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 10 |
4 files changed, 6 insertions, 18 deletions
diff --git a/platform/osx/display_server_osx.h b/platform/osx/display_server_osx.h index 4b558d973d..afc2754b0e 100644 --- a/platform/osx/display_server_osx.h +++ b/platform/osx/display_server_osx.h @@ -314,9 +314,6 @@ public: virtual void set_native_icon(const String &p_filename) override; virtual void set_icon(const Ref<Image> &p_icon) override; - virtual void console_set_visible(bool p_enabled) override; - virtual bool is_console_visible() const override; - static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error); static Vector<String> get_rendering_drivers_func(); diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm index 27d302a984..52cabfd821 100644 --- a/platform/osx/display_server_osx.mm +++ b/platform/osx/display_server_osx.mm @@ -1480,7 +1480,6 @@ bool DisplayServerOSX::has_feature(Feature p_feature) const { case FEATURE_CURSOR_SHAPE: case FEATURE_CUSTOM_CURSOR_SHAPE: case FEATURE_NATIVE_DIALOG: - //case FEATURE_CONSOLE_WINDOW: case FEATURE_IME: case FEATURE_WINDOW_TRANSPARENCY: case FEATURE_HIDPI: @@ -3679,14 +3678,6 @@ void DisplayServerOSX::swap_buffers() { #endif } -void DisplayServerOSX::console_set_visible(bool p_enabled) { - //TODO - open terminal and redirect -} - -bool DisplayServerOSX::is_console_visible() const { - return isatty(STDIN_FILENO); -} - DisplayServerOSX::DisplayServerOSX(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) { Input::get_singleton()->set_event_dispatch_function(_dispatch_input_events); diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 555ce4c75f..60dec1fe3f 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -94,7 +94,7 @@ public: String get_locale() const override; 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) 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 String get_unique_id() const override; //++ diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 821036de9c..32d0e6dd94 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -497,13 +497,13 @@ Error OS_OSX::create_instance(const List<String> &p_arguments, ProcessID *r_chil if (nsappname != nil) { String path; path.parse_utf8([[[NSBundle mainBundle] bundlePath] UTF8String]); - return create_process(path, p_arguments, r_child_id); + return create_process(path, p_arguments, r_child_id, false); } else { - return create_process(get_executable_path(), p_arguments, r_child_id); + return create_process(get_executable_path(), p_arguments, r_child_id, false); } } -Error OS_OSX::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id) { +Error OS_OSX::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id, bool p_open_console) { if (@available(macOS 10.15, *)) { // Use NSWorkspace if path is an .app bundle. NSURL *url = [NSURL fileURLWithPath:@(p_path.utf8().get_data())]; @@ -542,10 +542,10 @@ Error OS_OSX::create_process(const String &p_path, const List<String> &p_argumen return err; } else { - return OS_Unix::create_process(p_path, p_arguments, r_child_id); + return OS_Unix::create_process(p_path, p_arguments, r_child_id, p_open_console); } } else { - return OS_Unix::create_process(p_path, p_arguments, r_child_id); + return OS_Unix::create_process(p_path, p_arguments, r_child_id, p_open_console); } } |