From 9b0bdb17e51dfd4f3a26058d560bb4d81c67699a Mon Sep 17 00:00:00 2001 From: Corwin Kuiper Date: Sat, 6 Mar 2021 20:09:23 +0000 Subject: [PATCH] implement more ways of panicking --- examples/panic.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/panic.rs b/examples/panic.rs index 180c5973..4d21b5c8 100644 --- a/examples/panic.rs +++ b/examples/panic.rs @@ -14,8 +14,13 @@ fn main(_argc: isize, _argv: *const *const u8) -> isize { loop { input.update(); + // if A is pressed, draw out of range if input.is_just_pressed(gba::input::Button::A) { bitmap.draw_point(display::WIDTH, 0, 0x05); } + // if B is pressed, try take another bitmap + if input.is_just_pressed(gba::input::Button::B) { + gba.display.bitmap4(); + } } }