diff options
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/detect.py | 1 | ||||
-rw-r--r-- | platform/windows/display_server_windows.cpp | 8 | ||||
-rw-r--r-- | platform/windows/display_server_windows.h | 2 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 12 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 2 |
5 files changed, 12 insertions, 13 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 7772ba2dbe..a94f38583c 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -171,7 +171,6 @@ def setup_mingw(env): """Set up env for use with mingw""" # Nothing to do here print("Using MinGW") - pass def configure_msvc(env, manual_msvc_config): diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 4f64809abc..e78b23c509 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -79,10 +79,6 @@ String DisplayServerWindows::get_name() const { return "Windows"; } -void DisplayServerWindows::alert(const String &p_alert, const String &p_title) { - MessageBoxW(nullptr, (LPCWSTR)(p_alert.utf16().get_data()), (LPCWSTR)(p_title.utf16().get_data()), MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL); -} - void DisplayServerWindows::_set_mouse_mode_impl(MouseMode p_mode) { if (p_mode == MOUSE_MODE_CAPTURED || p_mode == MOUSE_MODE_CONFINED || p_mode == MOUSE_MODE_CONFINED_HIDDEN) { // Mouse is grabbed (captured or confined). @@ -3358,8 +3354,8 @@ Vector<String> DisplayServerWindows::get_rendering_drivers_func() { DisplayServer *DisplayServerWindows::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) { DisplayServer *ds = memnew(DisplayServerWindows(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error)); if (r_error != OK) { - ds->alert("Your video card driver does not support any of the supported Vulkan versions.\n" - "Please update your drivers or if you have a very old or integrated GPU upgrade it.", + OS::get_singleton()->alert("Your video card driver does not support any of the supported Vulkan versions.\n" + "Please update your drivers or if you have a very old or integrated GPU upgrade it.", "Unable to initialize Video driver"); } return ds; diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h index aa1d42d6ed..06014fbabe 100644 --- a/platform/windows/display_server_windows.h +++ b/platform/windows/display_server_windows.h @@ -442,8 +442,6 @@ public: virtual bool has_feature(Feature p_feature) const override; virtual String get_name() const override; - virtual void alert(const String &p_alert, const String &p_title = "ALERT!") override; - virtual void mouse_set_mode(MouseMode p_mode) override; virtual MouseMode mouse_get_mode() const override; diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 56d673afc3..2c8afaf7de 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -165,6 +165,10 @@ BOOL WINAPI HandlerRoutine(_In_ DWORD dwCtrlType) { } } +void OS_Windows::alert(const String &p_alert, const String &p_title) { + MessageBoxW(nullptr, (LPCWSTR)(p_alert.utf16().get_data()), (LPCWSTR)(p_title.utf16().get_data()), MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL); +} + void OS_Windows::initialize_debugging() { SetConsoleCtrlHandler(HandlerRoutine, TRUE); } @@ -407,8 +411,8 @@ String OS_Windows::_quote_command_line_argument(const String &p_text) const { Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, String *r_pipe, int *r_exitcode, bool read_stderr, Mutex *p_pipe_mutex) { String path = p_path.replace("/", "\\"); String command = _quote_command_line_argument(path); - for (const List<String>::Element *E = p_arguments.front(); E; E = E->next()) { - command += " " + _quote_command_line_argument(E->get()); + for (const String &E : p_arguments) { + command += " " + _quote_command_line_argument(E); } if (r_pipe) { @@ -463,8 +467,8 @@ Error OS_Windows::execute(const String &p_path, const List<String> &p_arguments, Error OS_Windows::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id) { String path = p_path.replace("/", "\\"); String command = _quote_command_line_argument(path); - for (const List<String>::Element *E = p_arguments.front(); E; E = E->next()) { - command += " " + _quote_command_line_argument(E->get()); + for (const String &E : p_arguments) { + command += " " + _quote_command_line_argument(E); } ProcessInfo pi; diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 8f9ef254f1..ea0c263b78 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -108,6 +108,8 @@ protected: Map<ProcessID, ProcessInfo> *process_map; public: + virtual void alert(const String &p_alert, const String &p_title = "ALERT!") override; + virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false) override; virtual Error close_dynamic_library(void *p_library_handle) override; virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional = false) override; |