From f4c3c1a7596c10cf57064af06f760d5b4cdfaa67 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 21 Apr 2005 05:14:25 +0000 Subject: [PATCH] add nvidia vsync hack from the SDL driver (copy and paste; not worth splitting it out) --- .../src/arch/LowLevelWindow/LowLevelWindow_X11.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stepmania/src/arch/LowLevelWindow/LowLevelWindow_X11.cpp b/stepmania/src/arch/LowLevelWindow/LowLevelWindow_X11.cpp index a8c1d51f56..df4b39ca7a 100644 --- a/stepmania/src/arch/LowLevelWindow/LowLevelWindow_X11.cpp +++ b/stepmania/src/arch/LowLevelWindow/LowLevelWindow_X11.cpp @@ -40,6 +40,18 @@ void *LowLevelWindow_X11::GetProcAddress(CString s) CString LowLevelWindow_X11::TryVideoMode(RageDisplay::VideoModeParams p, bool &bNewDeviceOut) { +#if defined(LINUX) + /* nVidia cards: + * + * This only works the first time we set up a window; after that, the + * drivers appear to cache the value, so you have to actually restart + * the program to change it again. */ + static char buf[128]; + strcpy( buf, "__GL_SYNC_TO_VBLANK=" ); + strcat( buf, p.vsync?"1":"0" ); + putenv( buf ); +#endif + XSizeHints hints; XEvent ev; stack otherEvs;