From 4e55dce30214a426c8621c565f525303b43fbf7f Mon Sep 17 00:00:00 2001 From: Rémy Raes Date: Wed, 19 Oct 2022 14:50:20 +0200 Subject: feat: Manually find game if needed (#7) * refactor: move updateGamePath method in store mutations * feat: play button allows game path update If game path was not found automatically and the user clicks the play button, FlightCore will ask him to point out his Titanfall2 installation folder. * refactor: change button text * feat: display a notification on successful game folder selection * feat: close permanent notification on successful game folder selection * fix: allow game launch with UNKNOWN install type on Windows * feat: set install type to UNKNOWN on manual folder pick * refactor: update omni-button text when game folder wasn't found --- src-tauri/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src-tauri/src') diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 38acf069..6a44514d 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -267,7 +267,8 @@ pub fn launch_northstar(game_install: GameInstall) -> Result { // 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::ORIGIN) + || matches!(game_install.install_type, InstallType::UNKNOWN)) { return Err(format!( "Not yet implemented for \"{}\" with Titanfall2 installed via \"{:?}\"", @@ -294,7 +295,8 @@ pub fn launch_northstar(game_install: GameInstall) -> Result { // Only Windows with Steam or Origin are supported at the moment if host_os == "windows" && (matches!(game_install.install_type, InstallType::STEAM) - || matches!(game_install.install_type, InstallType::ORIGIN)) + || matches!(game_install.install_type, InstallType::ORIGIN) + || matches!(game_install.install_type, InstallType::UNKNOWN)) { let _output = std::process::Command::new(format!("{}/NorthstarLauncher.exe", game_install.game_path)) -- cgit v1.2.3