diff options
author | Ryan C. Gordon <icculus@icculus.org> | 2015-12-29 02:16:14 -0500 |
---|---|---|
committer | Ryan C. Gordon <icculus@icculus.org> | 2015-12-29 02:16:14 -0500 |
commit | af331a256095352379c1edacbd86f8c23d00e0f9 (patch) | |
tree | 540d53de056efbb7e1841714c530c548fca40e55 | |
parent | a67f3f7ac086b84b10b585f324925452efec7e9d (diff) | |
download | sdl-af331a256095352379c1edacbd86f8c23d00e0f9.tar.gz |
XRandR: fixed primary output detection logic (thanks, "winterknight"!).
Fixes Bugzilla #3185.
-rw-r--r-- | src/video/x11/SDL_x11modes.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c index d21363647..0c31e35e9 100644 --- a/src/video/x11/SDL_x11modes.c +++ b/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; } |