Skip to content

Commit

Permalink
Merge pull request #71026 from bruvzg/fix_prim_detect
Browse files Browse the repository at this point in the history
[Windows] Fix primary screen detection.
  • Loading branch information
akien-mga committed Jan 7, 2023
2 parents d642274 + 9dc4f40 commit fcba87e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions platform/windows/display_server_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit fcba87e

Please sign in to comment.