Skip to content

Commit ed14d51

Browse files
authored
Merge pull request #92 from jonkuhn/main
allow game struct to be in a submodule
2 parents 3f4db6a + 5f1bcc9 commit ed14d51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ impl<T: 'static + Game> GameRunner<T> {
204204

205205
#[macro_export]
206206
macro_rules! crankstart_game {
207-
($game_struct:tt) => {
207+
($game_struct:ty) => {
208208
crankstart_game!($game_struct, PDSystemEvent::kEventInit);
209209
};
210-
($game_struct:tt, $pd_system_event:expr) => {
210+
($game_struct:ty, $pd_system_event:expr) => {
211211
pub mod game_setup {
212212
extern crate alloc;
213213
use super::*;
@@ -262,7 +262,7 @@ macro_rules! crankstart_game {
262262
.unwrap_or_else(|err| {
263263
log_to_console!("Got error while setting update callback: {err:#}");
264264
});
265-
let game = match $game_struct::new(&mut playdate) {
265+
let game = match <$game_struct>::new(&mut playdate) {
266266
Ok(game) => Some(game),
267267
Err(err) => {
268268
log_to_console!("Got error while creating game: {err:#}");

0 commit comments

Comments
 (0)