From fb84b49d87757226305cbaa96224e3fd84df5389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 14 Dec 2017 19:15:46 +0100 Subject: [PATCH] Fix type mismatch in OS::set_borderless_window Closes #14663. --- core/os/os.h | 2 +- platform/osx/os_osx.h | 2 +- platform/osx/os_osx.mm | 3 +-- platform/windows/os_windows.cpp | 2 +- platform/windows/os_windows.h | 2 +- platform/x11/os_x11.cpp | 2 +- platform/x11/os_x11.h | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/core/os/os.h b/core/os/os.h index 24871c5995b..41500acd93f 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -191,7 +191,7 @@ public: virtual bool is_window_maximized() const { return true; } virtual void request_attention() {} - virtual void set_borderless_window(int p_borderless) {} + virtual void set_borderless_window(bool p_borderless) {} virtual bool get_borderless_window() { return 0; } virtual void set_ime_position(const Point2 &p_pos) {} diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 33127a8c2a2..ede50a05bab 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -204,7 +204,7 @@ public: virtual void request_attention(); virtual String get_joy_guid(int p_device) const; - virtual void set_borderless_window(int p_borderless); + virtual void set_borderless_window(bool p_borderless); virtual bool get_borderless_window(); virtual void set_ime_position(const Point2 &p_pos); virtual void set_ime_intermediate_text_callback(ImeCallback p_callback, void *p_inp); diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 3d4883e2690..f3809e6eedd 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1818,7 +1818,7 @@ void OS_OSX::request_attention() { [NSApp requestUserAttention:NSCriticalRequest]; } -void OS_OSX::set_borderless_window(int p_borderless) { +void OS_OSX::set_borderless_window(bool p_borderless) { // OrderOut prevents a lose focus bug with the window [window_object orderOut:nil]; @@ -1975,7 +1975,6 @@ void OS_OSX::force_process_input() { process_events(); // get rid of pending events joypad_osx->process_joypads(); - } void OS_OSX::run() { diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index bbfeff74e89..5916c8f06c6 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1598,7 +1598,7 @@ bool OS_Windows::is_window_maximized() const { return maximized; } -void OS_Windows::set_borderless_window(int p_borderless) { +void OS_Windows::set_borderless_window(bool p_borderless) { if (video_mode.borderless_window == p_borderless) return; diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 0b0269a372f..f2226a53a99 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -210,7 +210,7 @@ public: virtual bool is_window_maximized() const; virtual void request_attention(); - virtual void set_borderless_window(int p_borderless); + virtual void set_borderless_window(bool p_borderless); virtual bool get_borderless_window(); virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index b2e023d9912..0c0bc1a8a3f 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1098,7 +1098,7 @@ bool OS_X11::is_window_maximized() const { return false; } -void OS_X11::set_borderless_window(int p_borderless) { +void OS_X11::set_borderless_window(bool p_borderless) { if (current_videomode.borderless_window == p_borderless) return; diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index ec8d12da27f..c8cea1e30ca 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -258,7 +258,7 @@ public: virtual bool is_window_maximized() const; virtual void request_attention(); - virtual void set_borderless_window(int p_borderless); + virtual void set_borderless_window(bool p_borderless); virtual bool get_borderless_window(); virtual void set_ime_position(const Point2 &p_pos);