Make the 'gl_vsync' argument work with Nvidia cards under Linux. Stella

will have to be restarted for this to take effect, so it still isn't the
ideal solution.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1359 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2007-08-25 23:57:35 +00:00
parent 9e8d75fff5
commit bd09057d69
1 changed files with 10 additions and 1 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: mainSDL.cxx,v 1.74 2007-07-27 13:49:16 stephena Exp $
// $Id: mainSDL.cxx,v 1.75 2007-08-25 23:57:35 stephena Exp $
//============================================================================
#include <SDL.h>
@ -138,6 +138,15 @@ int main(int argc, char* argv[])
if(theOSystem->settings().getBool("center"))
putenv("SDL_VIDEO_CENTERED=1");
#ifdef BSPF_UNIX
// Nvidia cards under UNIX don't currently support SDL_GL_SWAP_CONTROL
// So we need to do it with an Nvidia-specific environment variable
// This also means the setting can only be changed by restarting Stella
// This functionality should really be integrated into SDL directly
if(theOSystem->settings().getBool("gl_vsync"))
putenv("__GL_SYNC_TO_VBLANK=1");
#endif
//// Main loop ////
// First we check if a ROM is specified on the commandline. If so, and if
// the ROM actually exists, use it to create a new console.