Some PRINTFs in gui_flip_screen() to catch the lost screen bug.

This commit is contained in:
David Capello 2010-04-23 18:50:12 -03:00
parent 22b51d20d7
commit f24dc119ff

View File

@ -538,11 +538,16 @@ void gui_flip_screen()
// This is a strange Allegro bug where the "screen" pointer is lost,
// so we have to reconstruct it changing the gfx mode again
else if (screen == NULL) {
PRINTF("Gfx mode lost, trying to restore gfx mode...\n");
if (!lastWorkingGfxMode.setGfxMode()) {
PRINTF("Fatal error\n");
set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
user_printf(_("FATAL ERROR: Unable to restore the old graphics mode!\n"));
exit(1);
}
PRINTF("Successfully restored\n");
}
else
lastWorkingGfxMode.updateWithCurrentMode();