Skip to content

Commit 2dc0861

Browse files
committed
GLSupport: GLX - recover from more XRandR failure cases
1 parent 99b6a7e commit 2dc0861

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

RenderSystems/GLSupport/src/EGL/X11/OgreX11EGLSupport.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ namespace Ogre {
105105
}
106106
XRRFreeScreenConfigInfo(screenConfig);
107107
}
108-
} else
108+
}
109+
110+
if(mVideoModes.empty()) // none of the above worked
109111
{
110112
mCurrentMode.width = DisplayWidth(mNativeDisplay, DefaultScreen(mNativeDisplay));
111113
mCurrentMode.height = DisplayHeight(mNativeDisplay, DefaultScreen(mNativeDisplay));

RenderSystems/GLSupport/src/GLX/OgreGLXGLSupport.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ namespace Ogre
117117
XRRFreeScreenConfigInfo(screenConfig);
118118
}
119119
}
120-
else
120+
121+
if(mVideoModes.empty())
121122
{
122123
mCurrentMode.width = DisplayWidth(mXDisplay, DefaultScreen(mXDisplay));
123124
mCurrentMode.height = DisplayHeight(mXDisplay, DefaultScreen(mXDisplay));

0 commit comments

Comments
 (0)