fix panic renderer

This commit is contained in:
Corwin 2024-04-09 21:58:49 +01:00
parent d6b32e511d
commit 32eb34f226
No known key found for this signature in database

View file

@ -6,13 +6,13 @@ use crate::{
backtrace, backtrace,
display::{bitmap3::Bitmap3, busy_wait_for_vblank, HEIGHT, WIDTH}, display::{bitmap3::Bitmap3, busy_wait_for_vblank, HEIGHT, WIDTH},
dma::dma3_exclusive, dma::dma3_exclusive,
interrupt, mgba, syscall, mgba, syscall,
}; };
mod text; mod text;
pub fn render_backtrace(trace: &backtrace::Frames, info: &PanicInfo) -> ! { pub fn render_backtrace(trace: &backtrace::Frames, info: &PanicInfo) -> ! {
interrupt::free(|_cs| { critical_section::with(|_cs| {
dma3_exclusive(|| { dma3_exclusive(|| {
// SAFETY: This is not fine, but we're crashing anyway. The loop at the end should stop anything bad happening // SAFETY: This is not fine, but we're crashing anyway. The loop at the end should stop anything bad happening
let mut gba = unsafe { crate::Gba::new_in_entry() }; let mut gba = unsafe { crate::Gba::new_in_entry() };