DrawTextFCentered(46, FC_RED, WINDOW_SUBTITLE_STRING);
}
+static void ToggleFullscreenIfNeeded()
+{
+ if (setup.fullscreen != video.fullscreen_enabled)
+ {
+ /* save old door content */
+ BlitBitmap(backbuffer, pix[PIX_DB_DOOR],
+ DX, DY, DXSIZE, DYSIZE, DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1);
+
+ /* toggle fullscreen */
+ ChangeVideoModeIfNeeded(setup.fullscreen);
+ setup.fullscreen = video.fullscreen_enabled;
+
+ /* redraw background to newly created backbuffer */
+ BlitBitmap(pix[PIX_BACK], backbuffer, 0,0, WIN_XSIZE,WIN_YSIZE, 0,0);
+
+ /* restore old door content */
+ BlitBitmap(pix[PIX_DB_DOOR], backbuffer,
+ DOOR_GFX_PAGEX1, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY);
+
+ redraw_mask = REDRAW_ALL;
+ }
+}
+
void DrawMainMenu()
{
static struct LevelDirInfo *leveldir_last_valid = NULL;
UndrawSpecialEditorDoor();
/* needed if last screen was the setup screen and fullscreen state changed */
- setup.fullscreen = ChangeVideoModeIfNeeded(setup.fullscreen);
+ ToggleFullscreenIfNeeded();
+
#ifdef TARGET_SDL
SetDrawtoField(DRAW_BACKBUFFER);
#endif
DrawTextFCentered(ybottom, FC_BLUE, "Press any key or button for next page");
+#if 0
PlaySoundLoop(background_loop[num]);
+#endif
}
void DrawHelpScreenCreditsText()