From e9895534353a6f506e43d21ad471aa17be02cf2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Brammer?= Date: Mon, 24 Jan 2011 23:32:51 +0100 Subject: [PATCH] sdl: update for refresh rate API changes --- src/C4FullScreen.cpp | 2 +- src/platform/StdSDLApp.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/C4FullScreen.cpp b/src/C4FullScreen.cpp index 437a84abf..76e26ac06 100644 --- a/src/C4FullScreen.cpp +++ b/src/C4FullScreen.cpp @@ -347,7 +347,7 @@ void C4FullScreen::HandleMessage (SDL_Event &e) if (e.key.keysym.sym == SDLK_f && (e.key.keysym.mod & (KMOD_LMETA | KMOD_RMETA))) { Config.Graphics.Windowed = !Config.Graphics.Windowed; - Application.SetVideoMode(Config.Graphics.ResX, Config.Graphics.ResY, Config.Graphics.BitDepth, Config.Graphics.Monitor, !Config.Graphics.Windowed); + Application.SetVideoMode(Config.Graphics.ResX, Config.Graphics.ResY, Config.Graphics.BitDepth, Config.Graphics.RefreshRate, Config.Graphics.Monitor, !Config.Graphics.Windowed); lpDDraw->InvalidateDeviceObjects(); lpDDraw->RestoreDeviceObjects(); diff --git a/src/platform/StdSDLApp.cpp b/src/platform/StdSDLApp.cpp index 251118856..2d2744476 100644 --- a/src/platform/StdSDLApp.cpp +++ b/src/platform/StdSDLApp.cpp @@ -120,7 +120,7 @@ void CStdApp::HandleSDLEvent(SDL_Event& event) pWindow->HandleMessage(event); } -bool CStdApp::GetIndexedDisplayMode(int32_t iIndex, int32_t *piXRes, int32_t *piYRes, int32_t *piBitDepth, uint32_t iMonitor) +bool CStdApp::GetIndexedDisplayMode(int32_t iIndex, int32_t *piXRes, int32_t *piYRes, int32_t *piBitDepth, int32_t *piRefreshRate, uint32_t iMonitor) { // No support for multiple monitors. if (iMonitor != 0) @@ -152,7 +152,7 @@ bool CStdApp::GetIndexedDisplayMode(int32_t iIndex, int32_t *piXRes, int32_t *pi return true; } -bool CStdApp::SetVideoMode(unsigned int iXRes, unsigned int iYRes, unsigned int iColorDepth, unsigned int iMonitor, bool fFullScreen) +bool CStdApp::SetVideoMode(unsigned int iXRes, unsigned int iYRes, unsigned int iColorDepth, unsigned int RefreshRate, unsigned int iMonitor, bool fFullScreen) { // SDL doesn't support multiple monitors. if (!SDL_SetVideoMode(iXRes, iYRes, iColorDepth, SDL_OPENGL | (fFullScreen ? SDL_FULLSCREEN : 0)))