Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
XRandR: fixed primary output detection logic (thanks, "winterknight"!).
- Loading branch information
Showing
with
2 additions
and
3 deletions.
-
+2
−3
src/video/x11/SDL_x11modes.c
|
@@ -376,8 +376,7 @@ X11_InitModes_XRandR(_THIS) |
|
|
for (screen = 0; screen < screencount; screen++) { |
|
|
|
|
|
/* we want the primary output first, and then skipped later. */ |
|
|
if ((looking_for_primary && (screen != default_screen)) || |
|
|
(!looking_for_primary && (screen == default_screen))) { |
|
|
if (looking_for_primary && (screen != default_screen)) { |
|
|
continue; |
|
|
} |
|
|
|
|
@@ -421,7 +420,7 @@ X11_InitModes_XRandR(_THIS) |
|
|
XRRCrtcInfo *crtc; |
|
|
|
|
|
/* The primary output _should_ always be sorted first, but just in case... */ |
|
|
if ((looking_for_primary && ((screen != default_screen) || (res->outputs[output] != primary))) || |
|
|
if ((looking_for_primary && (res->outputs[output] != primary)) || |
|
|
(!looking_for_primary && (screen == default_screen) && (res->outputs[output] == primary))) { |
|
|
continue; |
|
|
} |
|
|