aboutsummaryrefslogtreecommitdiff
path: root/src-tauri
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-10-05 14:04:47 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-10-05 14:04:47 +0200
commit43d6fff1a1ffd3dc07efcc0cb4174086fd955bb5 (patch)
tree0fb0b19ef159b3499c9ab9963606d0ec0e8f4b26 /src-tauri
parent325d310ea8d8e567684a2ba4bfddcb1eec9b0eaa (diff)
downloadFlightCore-43d6fff1a1ffd3dc07efcc0cb4174086fd955bb5.tar.gz
FlightCore-43d6fff1a1ffd3dc07efcc0cb4174086fd955bb5.zip
feat: Add backend function to check if debug mode
Useful for having different UI between dev and release
Diffstat (limited to 'src-tauri')
-rw-r--r--src-tauri/src/main.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index a2866cb4..9cbef850 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -86,7 +86,8 @@ fn main() {
verify_game_files_caller,
get_enabled_mods_caller,
set_mod_enabled_status_caller,
- disable_all_but_core_caller
+ disable_all_but_core_caller,
+ is_debug_mode
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
@@ -111,6 +112,12 @@ fn force_panic() {
}
#[tauri::command]
+/// Returns true if built in debug mode
+fn is_debug_mode() -> bool {
+ return cfg!(debug_assertions);
+}
+
+#[tauri::command]
/// Returns the current version number as a string
fn get_version_number() -> String {
let version = env!("CARGO_PKG_VERSION");