refactor(engine): audit and rationalize platform cfg gates (closes #49)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
funman300
2026-05-27 18:00:57 -07:00
parent 561395fca6
commit ce536b0176
13 changed files with 302 additions and 243 deletions
+11 -2
View File
@@ -287,12 +287,21 @@ fn spawn_slide(commands: &mut Commands, index: u8, font_res: Option<&FontResourc
0 => spawn_slide_welcome(commands, font_res),
1 => spawn_slide_how_to_play(commands, font_res),
// Slide 2 (keyboard shortcuts) is desktop-only; Android has no keyboard.
#[cfg(not(target_os = "android"))]
2 => spawn_slide_hotkeys(commands, font_res),
2 => spawn_slide_hotkeys_if_available(commands, font_res),
_ => spawn_slide_welcome(commands, font_res),
}
}
#[cfg(not(target_os = "android"))]
fn spawn_slide_hotkeys_if_available(commands: &mut Commands, font_res: Option<&FontResource>) {
spawn_slide_hotkeys(commands, font_res);
}
#[cfg(target_os = "android")]
fn spawn_slide_hotkeys_if_available(commands: &mut Commands, font_res: Option<&FontResource>) {
spawn_slide_welcome(commands, font_res);
}
/// Slide 1 — Welcome.
fn spawn_slide_welcome(commands: &mut Commands, font_res: Option<&FontResource>) {
spawn_modal(commands, OnboardingScreen, Z_ONBOARDING, |card| {