From 9dc4f4096c90b025cd9cab41a2fa9e36bab4ef01 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Sat, 7 Jan 2023 15:41:06 +0200 Subject: [Windows] Fix primary screen detection. --- platform/windows/display_server_windows.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'platform') diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 114bfcb6f8..889797ca62 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -348,11 +348,9 @@ typedef struct { static BOOL CALLBACK _MonitorEnumProcPrim(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData) { EnumScreenData *data = (EnumScreenData *)dwData; - if (data->monitor == hMonitor) { - if ((lprcMonitor->left == 0) && (lprcMonitor->top == 0)) { - data->screen = data->count; - return FALSE; - } + if ((lprcMonitor->left == 0) && (lprcMonitor->top == 0)) { + data->screen = data->count; + return FALSE; } data->count++; -- cgit v1.2.3