aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-tauri/src/lib.rs30
-rw-r--r--src-vue/src/plugins/store.ts19
2 files changed, 21 insertions, 28 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 4a817af9..ba89cc0a 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -241,6 +241,21 @@ pub fn launch_northstar(
) -> Result<String, String> {
dbg!(game_install.clone());
+ let host_os = get_host_os();
+
+ // Explicitly 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)
+ || matches!(game_install.install_type, InstallType::UNKNOWN))
+ {
+ return Err(format!(
+ "Not yet implemented for \"{}\" with Titanfall2 installed via \"{:?}\"",
+ get_host_os(),
+ game_install.install_type
+ ));
+ }
+
let bypass_checks = match bypass_checks {
Some(bypass_checks) => bypass_checks,
None => false,
@@ -262,21 +277,6 @@ pub fn launch_northstar(
}
}
- 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)
- || matches!(game_install.install_type, InstallType::UNKNOWN))
- {
- 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() {
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts
index 2d7df80c..8e793ced 100644
--- a/src-vue/src/plugins/store.ts
+++ b/src-vue/src/plugins/store.ts
@@ -192,18 +192,6 @@ export const store = createStore<FlightCoreStore>({
// Game is ready to play.
case NorthstarState.READY_TO_PLAY:
- // Show an error message if Origin is not running.
- if (!state.origin_is_running) {
- ElNotification({
- title: 'Origin is not running',
- message: "Northstar cannot launch while you're not authenticated with Origin.",
- type: 'warning',
- position: 'bottom-right'
- });
-
- // If Origin isn't running, end here
- return;
- }
await invoke("launch_northstar_caller", { gameInstall: game_install })
.then((message) => {
console.log(message);
@@ -211,7 +199,12 @@ export const store = createStore<FlightCoreStore>({
})
.catch((error) => {
console.error(error);
- alert(error);
+ ElNotification({
+ title: 'Error',
+ message: error,
+ type: 'error',
+ position: 'bottom-right'
+ });
});
break;