Reinit the video mode when showing the console on an abnormal exit. This was not sccessful under some circumstances.

svn-id: r48727
This commit is contained in:
Andre Heider 2010-04-19 20:25:20 +00:00
parent 75f7536ca1
commit eb05f83a08

View File

@ -62,17 +62,31 @@ void power_cb(void) {
}
static void show_console(int code) {
u32 b;
u32 i, b;
printf("ScummVM exited abnormally (%d).\n", code);
gfx_frame_abort();
gfx_init();
if (!gfx_frame_start())
return;
gfx_con_draw();
gfx_frame_end();
for (i = 0; i < 60 * 3; ++i)
VIDEO_WaitVSync();
printf("Press any key to continue.\n");
if (!gfx_frame_start())
return;
gfx_con_draw();
gfx_frame_end();
VIDEO_WaitVSync();
while (true) {
b = 0;
@ -90,6 +104,15 @@ static void show_console(int code) {
VIDEO_WaitVSync();
}
printf("\n\nExiting...\n");
if (!gfx_frame_start())
return;
gfx_con_draw();
gfx_frame_end();
VIDEO_WaitVSync();
}
s32 reset_func(s32 final) {