diff --git a/src/lib.rs b/src/lib.rs index 386d71b..cd564b6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -210,6 +210,9 @@ impl GameRunner { #[macro_export] macro_rules! crankstart_game { ($game_struct:tt) => { + crankstart_game!($game_struct, PDSystemEvent::kEventInit) + }; + ($game_struct:tt, $pd_system_event:expr) => { pub mod game_setup { extern crate alloc; use super::*; @@ -250,7 +253,7 @@ macro_rules! crankstart_game { event: PDSystemEvent, _arg: u32, ) -> crankstart_sys::ctypes::c_int { - if event == PDSystemEvent::kEventInit { + if event == $pd_system_event { // This would only fail if PlaydateAPI has null pointers, which shouldn't happen. let mut playdate = match Playdate::new(playdate, sprite_update, sprite_draw) { Ok(playdate) => playdate,