diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2024-02-06 14:44:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-06 14:44:21 +0100 |
commit | a074ecb2513803fa4fa91199d1f4ec2101bb34b2 (patch) | |
tree | 4a66a7d650e2594fa449f9d0f87b5af0383ec507 /src-tauri/src/northstar/mod.rs | |
parent | c48549a6a65caedb17e74a974b4ae03cb962d874 (diff) | |
download | FlightCore-a074ecb2513803fa4fa91199d1f4ec2101bb34b2.tar.gz FlightCore-a074ecb2513803fa4fa91199d1f4ec2101bb34b2.zip |
refactor: Get Steam ID from libthermite (#786)
Instead of defining our own const, let's just re-use the one recently added to libthermite
Diffstat (limited to 'src-tauri/src/northstar/mod.rs')
-rw-r--r-- | src-tauri/src/northstar/mod.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src-tauri/src/northstar/mod.rs b/src-tauri/src/northstar/mod.rs index ea4f4cde..9191c595 100644 --- a/src-tauri/src/northstar/mod.rs +++ b/src-tauri/src/northstar/mod.rs @@ -4,11 +4,7 @@ pub mod install; pub mod profile; use crate::util::check_ea_app_or_origin_running; -use crate::{ - constants::{CORE_MODS, TITANFALL2_STEAM_ID}, - platform_specific::get_host_os, - GameInstall, InstallType, -}; +use crate::{constants::CORE_MODS, platform_specific::get_host_os, GameInstall, InstallType}; use crate::{NorthstarThunderstoreRelease, NorthstarThunderstoreReleaseWrapper}; use anyhow::anyhow; @@ -239,8 +235,7 @@ pub fn launch_northstar_steam( match steamlocate::SteamDir::locate() { Some(mut steamdir) => { if get_host_os() != "windows" { - let titanfall2_steamid: u32 = TITANFALL2_STEAM_ID.parse().unwrap(); - match steamdir.compat_tool(&titanfall2_steamid) { + match steamdir.compat_tool(&thermite::TITANFALL2_STEAM_ID) { Some(_) => {} None => { return Err( @@ -263,7 +258,8 @@ pub fn launch_northstar_steam( match open::that(format!( "steam://run/{}//-profile={} --northstar/", - TITANFALL2_STEAM_ID, game_install.profile + thermite::TITANFALL2_STEAM_ID, + game_install.profile )) { Ok(()) => Ok("Started game".to_string()), Err(_err) => Err("Failed to launch Titanfall 2 via Steam".to_string()), |