From e0d68eec15e757ca92f0a2df9d2c97e1b271434c Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Tue, 2 Apr 2024 23:31:02 +0100 Subject: [PATCH] Correctly render in release mode --- agb/src/panics_render.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/agb/src/panics_render.rs b/agb/src/panics_render.rs index f6bc4d7b..f1970ae5 100644 --- a/agb/src/panics_render.rs +++ b/agb/src/panics_render.rs @@ -33,6 +33,8 @@ pub fn render_backtrace(trace: &backtrace::Frames, info: &PanicInfo) -> ! { text::BitmapTextRender::new(&mut gfx, (8, location).into(), 0x0000); let _ = write!(&mut panic_text_render, "{info}"); + // need to wait 2 frames to ensure that mgba finishes rendering before the fatal call below + busy_wait_for_vblank(); busy_wait_for_vblank(); if let Some(mut mgba) = mgba::Mgba::new() {