aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src
diff options
context:
space:
mode:
authorRémy Raes <contact@remyraes.com>2022-10-19 14:50:20 +0200
committerGitHub <noreply@github.com>2022-10-19 14:50:20 +0200
commit4e55dce30214a426c8621c565f525303b43fbf7f (patch)
tree22a053a9f09b88190086a34c4e8295ef78f0ba53 /src-tauri/src
parent546d1908b15fc7c21b1b5f0109826fb03a5493fd (diff)
downloadFlightCore-4e55dce30214a426c8621c565f525303b43fbf7f.tar.gz
FlightCore-4e55dce30214a426c8621c565f525303b43fbf7f.zip
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
Diffstat (limited to 'src-tauri/src')
-rw-r--r--src-tauri/src/lib.rs6
1 files changed, 4 insertions, 2 deletions
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<String, String> {
// 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<String, String> {
// 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))