@@ -627,25 +627,25 @@ static bool SdlVideoChangeRes(int w, int
{
/* See if the mode is available. Ignore return value
* since we will get back a valid resolution anyways. Either exactly
* the same one, or one clamped to the closest available one */
GetAvailableVideoMode(&w, &h);
CreateMainSurface(w, h);
return true;
}
void ToggleFullScreen(bool full_screen)
_fullscreen ^= full_screen;
_fullscreen = full_screen;
GetVideoModes(); // get the list of available video modes
if (!_video_driver->change_resolution(_cur_resolution[0], _cur_resolution[1]))
_fullscreen ^= true; // switching resolution failed, put back full_screen to original status
const HalVideoDriver _sdl_video_driver = {
SdlVideoStart,
SdlVideoStop,
SdlVideoMakeDirty,
SdlVideoMainLoop,
SdlVideoChangeRes,
};
Status change: