@@ -43,9 +43,11 @@ distribution.
4343#include "gx.h"
4444#include "pad.h"
4545#include "consol.h"
46+ #include "color.h"
4647#include "console_internal.h"
4748#include "lwp_threads.h"
4849#include "ios.h"
50+ #include "video.h"
4951
5052#include "ogc/video_types.h"
5153
@@ -69,6 +71,7 @@ extern void irq_exceptionhandler(frame_context*);
6971extern void dec_exceptionhandler (frame_context * );
7072extern void default_exceptionhandler (frame_context * );
7173extern void VIDEO_SetFramebuffer (void * );
74+ extern void __VIClearFramebuffer (void * , u32 , u32 );
7275extern void __reload (void );
7376
7477extern s8 exceptionhandler_start [],exceptionhandler_end [],exceptionhandler_patch [];
@@ -237,9 +240,13 @@ static void waitForReload(void)
237240//just implement core for unrecoverable exceptions.
238241void c_default_exceptionhandler (frame_context * pCtx )
239242{
243+ const u16 console_height = 680 ;
244+ const u16 console_width = 574 ;
245+
240246 GX_AbortFrame ();
241247 VIDEO_SetFramebuffer (exception_xfb );
242- __console_init (exception_xfb ,20 ,20 ,640 ,574 ,1280 );
248+ __VIClearFramebuffer (exception_xfb , console_height * console_width * VI_DISPLAY_PIX_SZ , COLOR_BLACK );
249+ __console_init (exception_xfb , 20 , 20 , console_height - 40 , console_width - 40 , 1280 );
243250 CON_EnableGecko (1 , true);
244251
245252 kprintf ("\n\n\n\tException (%s) occurred!\n" , exception_name [pCtx -> EXCPT_Number ]);
0 commit comments