From 3bd65dbe56e593b6f58c290b5a43014db6e465e8 Mon Sep 17 00:00:00 2001 From: Chris Gilbert Date: Wed, 13 Nov 2002 01:30:01 +0000 Subject: [PATCH] refresh rate changes fixed --- stepmania/src/RageDisplay.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/stepmania/src/RageDisplay.cpp b/stepmania/src/RageDisplay.cpp index 947145b56b..7fd5c44850 100644 --- a/stepmania/src/RageDisplay.cpp +++ b/stepmania/src/RageDisplay.cpp @@ -54,6 +54,7 @@ int g_glVersion; int RageDisplay::GetFPS() const { return g_iFPS; } int RageDisplay::GetVPF() const { return g_iVPF; } int RageDisplay::GetDPF() const { return g_iDPF; } +DEVMODE SMGfx; static int g_iFramesRenderedSinceLastCheck, g_iVertsRenderedSinceLastCheck, @@ -170,8 +171,20 @@ bool RageDisplay::SetVideoMode( bool windowed, int width, int height, int bpp, i #ifdef SDL_HAS_REFRESH_RATE if(rate == REFRESH_DEFAULT) SDL_SM_SetRefreshRate(0); - else - SDL_SM_SetRefreshRate(rate); + /*else + // Change Windows Refresh Rate: + // This is a modification of a code snippet I found + // It changes the windows desktop refresh rate if + // it's on a windows platform. + // -=Lance Gilbert=- + #if defined(WIN32) + ::ZeroMemory(&SMGfx, sizeof(SMGfx)); + SMGfx.dmDisplayFrequency = rate; + SMGfx.dmFields = DM_DISPLAYFREQUENCY; + SMGfx.dmSize = sizeof(SMGfx); + ChangeDisplaySettings(&SMGfx, 0); + #endif*/ + #endif bool need_reload = false;