mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew
synced 2026-01-12 08:12:36 +08:00
Add the (currently android) easter mode
This commit is contained in:
@@ -5,6 +5,7 @@ use std::fs;
|
||||
lazy_static! {
|
||||
static ref RUNNING: RwLock<bool> = RwLock::new(false);
|
||||
static ref DATAPATH: RwLock<String> = RwLock::new(String::new());
|
||||
static ref EASTER: RwLock<bool> = RwLock::new(false);
|
||||
}
|
||||
|
||||
pub fn set_running(running: bool) {
|
||||
@@ -31,3 +32,13 @@ pub fn update_data_path(path: &str) {
|
||||
let mut w = DATAPATH.write().unwrap();
|
||||
*w = path.to_string();
|
||||
}
|
||||
|
||||
// Only currently editable by the android so
|
||||
pub fn set_easter_mode(enabled: bool) {
|
||||
let mut w = EASTER.write().unwrap();
|
||||
*w = enabled;
|
||||
}
|
||||
|
||||
pub fn get_easter_mode() -> bool {
|
||||
*EASTER.read().unwrap()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user