From 3e8a263f4ea1bfe28af6ad309672275c06aa2b97 Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Sun, 28 Jan 2024 12:13:55 -0500 Subject: [PATCH] Add thing at startup in debug builds (for testing) --- backend/src/main.rs | 6 ++++++ backend/src/settings/steam_deck/mod.rs | 3 +++ 2 files changed, 9 insertions(+) diff --git a/backend/src/main.rs b/backend/src/main.rs index f2f683b..4ceab20 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -334,6 +334,12 @@ fn main() -> Result<(), ()> { utility::ioperm_power_ec(); + #[cfg(debug_assertions)] + std::thread::spawn(|| { + utility::ioperm_power_ec(); + settings::steam_deck::util::flash_led(); + }); + if let Err(e) = loaded_settings.on_set() { e.iter() .for_each(|e| log::error!("Startup Settings.on_set() error: {}", e)); diff --git a/backend/src/settings/steam_deck/mod.rs b/backend/src/settings/steam_deck/mod.rs index b3f840d..a87f005 100644 --- a/backend/src/settings/steam_deck/mod.rs +++ b/backend/src/settings/steam_deck/mod.rs @@ -2,6 +2,9 @@ mod battery; mod cpu; mod gpu; mod power_dpm_force; +#[cfg(debug_assertions)] +pub mod util; +#[cfg(not(debug_assertions))] mod util; pub use battery::Battery;