forked from Mirrors/openclonk
sdl: update for refresh rate API changes
parent
6e0d2ad391
commit
e989553435
|
@ -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();
|
||||
|
||||
|
|
|
@ -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)))
|
||||
|
|
Loading…
Reference in New Issue