mirror of https://github.com/PCSX2/pcsx2.git
zzogl-pg: Add a usleep when toggled fullscreen.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3907 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
e928cc14f6
commit
31ab78588a
|
@ -227,8 +227,11 @@ void GLWindow::ToggleFullscreen()
|
||||||
XUnlockDisplay(glDisplay);
|
XUnlockDisplay(glDisplay);
|
||||||
|
|
||||||
// Apply the change
|
// Apply the change
|
||||||
// Note: Xsync is not enough. All pending event must be flush.
|
XSync(glDisplay, false);
|
||||||
XFlush(glDisplay);
|
|
||||||
|
// Wait a little that the VM does his joes. Actually the best is to check some WM event
|
||||||
|
// but it not sure it will appear so a time out is necessary.
|
||||||
|
usleep(100*1000); // 100 us should be far enough for old computer and unnoticeable for users
|
||||||
|
|
||||||
// update info structure
|
// update info structure
|
||||||
GetWindowSize();
|
GetWindowSize();
|
||||||
|
@ -242,9 +245,8 @@ void GLWindow::ToggleFullscreen()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide the cursor in the right bottom corner
|
// Hide the cursor in the right bottom corner
|
||||||
// Note: Use big value instead of width/height to be sure it is really out of the screen
|
|
||||||
if(fullScreen)
|
if(fullScreen)
|
||||||
XWarpPointer(glDisplay, None, glWindow, 0, 0, 0, 0, 4000, 2000);
|
XWarpPointer(glDisplay, None, glWindow, 0, 0, 0, 0, 2*width, 2*height);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue