diff options
Diffstat (limited to 'src-tauri/src/northstar/mod.rs')
-rw-r--r-- | src-tauri/src/northstar/mod.rs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src-tauri/src/northstar/mod.rs b/src-tauri/src/northstar/mod.rs index 0b37c3f6..4b16f701 100644 --- a/src-tauri/src/northstar/mod.rs +++ b/src-tauri/src/northstar/mod.rs @@ -235,19 +235,25 @@ pub fn launch_northstar_steam(game_install: GameInstall) -> Result<String, Strin } match steamlocate::SteamDir::locate() { - Some(mut steamdir) => { + Ok(steamdir) => { if get_host_os() != "windows" { - match steamdir.compat_tool(&thermite::TITANFALL2_STEAM_ID) { - Some(_) => {} - None => { - return Err( - "Titanfall2 was not configured to use a compatibility tool".to_string() - ); + match steamdir.compat_tool_mapping() { + Ok(map) => match map.get(&thermite::TITANFALL2_STEAM_ID) { + Some(_) => {} + None => { + return Err( + "Titanfall2 was not configured to use a compatibility tool" + .to_string(), + ); + } + }, + Err(_) => { + return Err("Could not get compatibility tool mapping".to_string()); } } } } - None => { + Err(_) => { return Err("Couldn't access Titanfall2 directory".to_string()); } } |