From 3ce579722dd4899e24f1bf04a7be98b00366eacf Mon Sep 17 00:00:00 2001 From: Felix Wiegand Date: Tue, 14 Nov 2023 02:47:26 +0100 Subject: [PATCH] Support 32-bit android --- Cargo.toml | 2 +- src/gui/tabs/configure.rs | 4 ++-- src/simulation.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c328f4f..b02925e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,7 @@ rand = { version = "0.8", default-features = false, features = ["small_rng", "ge rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] } # Android dependencies -[target.'cfg(target_arch = "aarch64")'.dependencies] +[target.'cfg(target_os = "android")'.dependencies] home = "0.5" # No home directories in web assembly indicatif = "0.17" rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] } diff --git a/src/gui/tabs/configure.rs b/src/gui/tabs/configure.rs index 1a7ad2d..8385337 100644 --- a/src/gui/tabs/configure.rs +++ b/src/gui/tabs/configure.rs @@ -185,12 +185,12 @@ impl ConfigureTab { data_source.send(UplinkMessage::WriteSettings(settings)).unwrap(); } - #[cfg(not(any(target_arch = "wasm32", target_arch="aarch64")))] + #[cfg(not(any(target_arch = "wasm32", target_os="android")))] if ui.add_enabled(data_source.fc_settings().is_some(), Button::new("🖹 Save to File")).clicked() { save_fc_settings_file(&data_source.fc_settings().unwrap()); } - #[cfg(not(any(target_arch = "wasm32", target_arch="aarch64")))] + #[cfg(not(any(target_arch = "wasm32", target_os="android")))] if ui.add_enabled(data_source.fc_settings().is_some(), Button::new("🖹 Load from File")).clicked() { if let Some(settings) = open_fc_settings_file() { diff --git a/src/simulation.rs b/src/simulation.rs index 28adffc..dc078c0 100644 --- a/src/simulation.rs +++ b/src/simulation.rs @@ -13,9 +13,9 @@ use crate::state::VehicleState; use crate::gui::ARCHIVE; -#[cfg(any(target_os="windows", target_arch="aarch64"))] +#[cfg(any(target_os="windows", target_os="android"))] type Rng = rand::rngs::StdRng; -#[cfg(not(any(target_os="windows", target_arch="aarch64")))] +#[cfg(not(any(target_os="windows", target_os="android")))] type Rng = rand::rngs::SmallRng; const GRAVITY: f32 = 9.80665;