Skip to content

Commit

Permalink
Support 32-bit android
Browse files Browse the repository at this point in the history
  • Loading branch information
KoffeinFlummi committed Nov 14, 2023
1 parent be1b1ad commit 3ce5797
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
4 changes: 2 additions & 2 deletions src/gui/tabs/configure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/simulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3ce5797

Please sign in to comment.