aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-13 22:55:08 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-13 22:55:08 +0200
commit6f20245b8a746b64d44064556a0305acc1ccbf88 (patch)
tree752dcf726ae91772f1367b30ec4e4349efc9d1e5 /src-tauri/src
parent04d19c48f1d64280d8cfd8157f35be8740e0a3e0 (diff)
downloadFlightCore-6f20245b8a746b64d44064556a0305acc1ccbf88.tar.gz
FlightCore-6f20245b8a746b64d44064556a0305acc1ccbf88.zip
When launching NS explicetly fail early
certain unsupported setup combinations
Diffstat (limited to 'src-tauri/src')
-rw-r--r--src-tauri/src/lib.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 4abf2a29..0e8adbf0 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -262,6 +262,18 @@ pub fn launch_northstar(game_install: GameInstall) -> Result<String, String> {
let host_os = get_host_os();
+ // Explicetly fail early certain (currently) unsupported install setups
+ if host_os != "windows"
+ || !(matches!(game_install.install_type, InstallType::STEAM)
+ || matches!(game_install.install_type, InstallType::ORIGIN))
+ {
+ return Err(format!(
+ "Not yet implemented for \"{}\" with Titanfall2 installed via \"{:?}\"",
+ get_host_os(),
+ game_install.install_type
+ ));
+ }
+
// Switch to Titanfall2 directory for launching
// NorthstarLauncher.exe expects to be run from that folder
if std::env::set_current_dir(game_install.game_path.clone()).is_err() {