mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Fixed an issue that caused the render to main window to lose focus if the gfx config dialog is opened while the emulator is running. Only affects linux. Also fixed a few preprocessor conditionals.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5186 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -208,12 +208,18 @@ void Win32AddResolutions()
|
||||
}
|
||||
#elif defined(HAVE_X11) && HAVE_X11 && defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
void X11AddResolutions() {
|
||||
GLWin.dpy = XOpenDisplay(0);
|
||||
// Don't modify GLWin.dpy here.
|
||||
// If the emulator is running that is bad.
|
||||
Display *dpy;
|
||||
int screen;
|
||||
dpy = XOpenDisplay(0);
|
||||
screen = DefaultScreen(dpy);
|
||||
//Get all full screen resos for the config dialog
|
||||
XRRScreenSize *sizes = NULL;
|
||||
int modeNum = 0;
|
||||
|
||||
sizes = XRRSizes(GLWin.dpy, GLWin.screen, &modeNum);
|
||||
sizes = XRRSizes(dpy, screen, &modeNum);
|
||||
XCloseDisplay(dpy);
|
||||
if (modeNum > 0 && sizes != NULL)
|
||||
{
|
||||
for (int i = 0; i < modeNum; i++)
|
||||
|
Reference in New Issue
Block a user