From eb05f83a08b4b0acc9dee662eca36540b25a369c Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Mon, 19 Apr 2010 20:25:20 +0000 Subject: Reinit the video mode when showing the console on an abnormal exit. This was not sccessful under some circumstances. svn-id: r48727 --- backends/platform/wii/main.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'backends/platform') diff --git a/backends/platform/wii/main.cpp b/backends/platform/wii/main.cpp index a0a28501cc..627cc7d1db 100644 --- a/backends/platform/wii/main.cpp +++ b/backends/platform/wii/main.cpp @@ -62,16 +62,30 @@ 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) { -- cgit v1.2.3