diff options
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/os_windows.cpp | 6 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 72f6068eb6..3f8a45d7e5 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1385,7 +1385,7 @@ static BOOL CALLBACK _MonitorEnumProcPos(HMONITOR hMonitor, HDC hdcMonitor, LPRE Point2 OS_Windows::get_screen_position(int p_screen) const { - EnumPosData data = { 0, p_screen, Point2() }; + EnumPosData data = { 0, p_screen == -1 ? get_current_screen() : p_screen, Point2() }; EnumDisplayMonitors(NULL, NULL, _MonitorEnumProcPos, (LPARAM)&data); return data.pos; } @@ -1410,7 +1410,7 @@ static BOOL CALLBACK _MonitorEnumProcSize(HMONITOR hMonitor, HDC hdcMonitor, LPR Size2 OS_Windows::get_screen_size(int p_screen) const { - EnumSizeData data = { 0, p_screen, Size2() }; + EnumSizeData data = { 0, p_screen == -1 ? get_current_screen() : p_screen, Size2() }; EnumDisplayMonitors(NULL, NULL, _MonitorEnumProcSize, (LPARAM)&data); return data.size; } @@ -1434,7 +1434,7 @@ static BOOL CALLBACK _MonitorEnumProcDpi(HMONITOR hMonitor, HDC hdcMonitor, LPRE int OS_Windows::get_screen_dpi(int p_screen) const { - EnumDpiData data = { 0, p_screen, 72 }; + EnumDpiData data = { 0, p_screen == -1 ? get_current_screen() : p_screen, 72 }; EnumDisplayMonitors(NULL, NULL, _MonitorEnumProcDpi, (LPARAM)&data); return data.dpi; } diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index e9af14f11c..deb1ae0982 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -194,9 +194,9 @@ public: virtual int get_screen_count() const; virtual int get_current_screen() const; virtual void set_current_screen(int p_screen); - virtual Point2 get_screen_position(int p_screen = 0) const; - virtual Size2 get_screen_size(int p_screen = 0) const; - virtual int get_screen_dpi(int p_screen = 0) const; + virtual Point2 get_screen_position(int p_screen = -1) const; + virtual Size2 get_screen_size(int p_screen = -1) const; + virtual int get_screen_dpi(int p_screen = -1) const; virtual Point2 get_window_position() const; virtual void set_window_position(const Point2 &p_position); |