From 45436d0edad0c6f75b82270a46384a1b4ed5885c Mon Sep 17 00:00:00 2001 From: funman300 Date: Fri, 8 May 2026 20:19:18 -0700 Subject: [PATCH] fix(android): gate handle_fullscreen and its imports to non-Android F11 fullscreen toggle only makes sense on desktop; Android windows are always full-screen. Gates the fn and the MonitorSelection/WindowMode imports with #[cfg(not(target_os = "android"))] to keep clippy clean on the Android target. The add_systems call is extracted as a separate statement so #[cfg] can annotate it (cannot appear mid-chain). Co-Authored-By: Claude Sonnet 4.6 --- solitaire_engine/src/input_plugin.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/solitaire_engine/src/input_plugin.rs b/solitaire_engine/src/input_plugin.rs index 10245d3..788b184 100644 --- a/solitaire_engine/src/input_plugin.rs +++ b/solitaire_engine/src/input_plugin.rs @@ -23,7 +23,9 @@ use bevy::input::touch::{TouchInput, TouchPhase, Touches}; use bevy::input::ButtonInput; use bevy::math::{Vec2, Vec3}; use bevy::prelude::*; -use bevy::window::{MonitorSelection, PrimaryWindow, WindowMode}; +use bevy::window::PrimaryWindow; +#[cfg(not(target_os = "android"))] +use bevy::window::{MonitorSelection, WindowMode}; use solitaire_core::card::{Card, Suit}; use solitaire_core::game_state::GameState; use solitaire_core::pile::PileType; @@ -110,8 +112,11 @@ impl Plugin for InputPlugin { ) .chain(), ) - .add_systems(Update, handle_fullscreen) - .add_systems(Update, reset_hint_cycle_on_state_change) + .add_systems(Update, reset_hint_cycle_on_state_change); + // F11 fullscreen toggle is desktop-only; Android windows are always full-screen. + #[cfg(not(target_os = "android"))] + app.add_systems(Update, handle_fullscreen); + app // Async hint pipeline: state-change drop runs before the // poll system so a move applied this frame cancels any // in-flight task before its result can be surfaced. @@ -424,6 +429,7 @@ fn reset_hint_cycle_on_state_change( /// `F11` toggles between borderless-fullscreen and windowed mode. /// Not gated by the pause flag — the player can always resize the window. +#[cfg(not(target_os = "android"))] fn handle_fullscreen( keys: Res>, mut windows: Query<&mut Window, With>,