From 7894559ca72386c1d0468dc81e1905580ff8d940 Mon Sep 17 00:00:00 2001 From: funman300 Date: Fri, 8 May 2026 22:04:54 -0700 Subject: [PATCH] fix(android): gate had_saved_geometry and apply_smart_default_window_size Both symbols are desktop-only: the variable feeds apply_smart_default_ window_size which is only registered inside a cfg(not(android)) block. Without the matching cfg gate on the declaration / definition, the Android cross-compile emits unused-variable and dead-code errors (-D warnings turns them into hard failures). Co-Authored-By: Claude Sonnet 4.6 --- solitaire_app/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/solitaire_app/src/lib.rs b/solitaire_app/src/lib.rs index 56f18d1..d49c4bf 100644 --- a/solitaire_app/src/lib.rs +++ b/solitaire_app/src/lib.rs @@ -77,6 +77,7 @@ pub fn run() { // primary monitor) — `apply_smart_default_window_size` will resize // up to a monitor-relative target on the first frame so HiDPI / 4K // sessions don't end up with a comparatively tiny window. + #[cfg(not(target_os = "android"))] let had_saved_geometry = settings.window_geometry.is_some(); let (window_resolution, window_position) = match settings.window_geometry { Some(geom) => ( @@ -230,6 +231,7 @@ pub fn run() { /// a dedicated resource. The Update tick is necessary because Bevy /// populates the `Monitor` entities asynchronously after winit's /// Resumed event fires; they may not exist on the first Startup pass. +#[cfg(not(target_os = "android"))] fn apply_smart_default_window_size( mut applied: Local, monitors: Query<&Monitor, With>,