Fix SDL code that still used DDrawCfg.Windowed

stable-5.1
Martin Plicht 2010-02-24 12:49:08 +01:00
parent 956de7aef5
commit b8309bd851
1 changed files with 3 additions and 8 deletions

View File

@ -339,17 +339,12 @@ void C4FullScreen::HandleMessage (SDL_Event &e)
#ifdef USE_GL
if (e.key.keysym.sym == SDLK_f && (e.key.keysym.mod & (KMOD_LMETA | KMOD_RMETA)))
{
DDrawCfg.Windowed = !DDrawCfg.Windowed;
if (pGL) pGL->fFullscreen = !DDrawCfg.Windowed;
Application.SetVideoMode(Config.Graphics.ResX, Config.Graphics.ResY, Config.Graphics.BitDepth, Config.Graphics.Monitor, !DDrawCfg.Windowed);
Config.Graphics.Windowed = !Config.Graphics.Windowed;
if (pGL) pGL->fFullscreen = !Config.Graphics.Windowed;
Application.SetVideoMode(Config.Graphics.ResX, Config.Graphics.ResY, Config.Graphics.BitDepth, Config.Graphics.Monitor, !Config.Graphics.Windowed);
lpDDraw->InvalidateDeviceObjects();
lpDDraw->RestoreDeviceObjects();
if (DDrawCfg.Windowed)
Config.Graphics.NewGfxCfgGL |= C4GFXCFG_WINDOWED;
else
Config.Graphics.NewGfxCfgGL &= ~C4GFXCFG_WINDOWED;
break;
}
#endif