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:
gregory.hainaut@gmail.com 2010-10-09 09:02:23 +00:00
parent e928cc14f6
commit 31ab78588a
1 changed files with 6 additions and 4 deletions

View File

@ -227,8 +227,11 @@ void GLWindow::ToggleFullscreen()
XUnlockDisplay(glDisplay);
// Apply the change
// Note: Xsync is not enough. All pending event must be flush.
XFlush(glDisplay);
XSync(glDisplay, false);
// 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
GetWindowSize();
@ -242,9 +245,8 @@ void GLWindow::ToggleFullscreen()
}
// 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)
XWarpPointer(glDisplay, None, glWindow, 0, 0, 0, 0, 4000, 2000);
XWarpPointer(glDisplay, None, glWindow, 0, 0, 0, 0, 2*width, 2*height);
}