diff options
author | Ombrezz <ghostcoder256@gmail.com> | 2023-09-18 07:47:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-18 13:47:28 +0200 |
commit | a0e6fcc4c67411f4a2251fecb9c849233101f1b3 (patch) | |
tree | 86c59dc6088c6c05d06a3a93a89564e1d72123e7 /src-tauri/src/northstar | |
parent | f3c749f4a8dbb8953cf392604b077f1547400ae0 (diff) | |
download | FlightCore-a0e6fcc4c67411f4a2251fecb9c849233101f1b3.tar.gz FlightCore-a0e6fcc4c67411f4a2251fecb9c849233101f1b3.zip |
Allow ProtonGE to be used as a compatibility tool (#533)
* Allow ProtonGE to be used as a compatibility tool
* Use constant list to track valid Proton builds
* Fixed formatting
* Update to doc comments
Diffstat (limited to 'src-tauri/src/northstar')
-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 4fecfe51..5b0139f9 100644 --- a/src-tauri/src/northstar/mod.rs +++ b/src-tauri/src/northstar/mod.rs @@ -5,7 +5,7 @@ pub mod profile; use crate::util::check_ea_app_or_origin_running; use crate::{ - constants::{CORE_MODS, TITANFALL2_STEAM_ID}, + constants::{CORE_MODS, TITANFALL2_STEAM_ID, VALID_NORTHSTAR_PROTON_BUILDS}, get_host_os, GameInstall, InstallType, }; use anyhow::anyhow; @@ -145,15 +145,11 @@ pub fn launch_northstar_steam( let titanfall2_steamid: u32 = TITANFALL2_STEAM_ID.parse().unwrap(); match steamdir.compat_tool(&titanfall2_steamid) { Some(compat) => { - if !compat - .name - .clone() - .unwrap() - .to_ascii_lowercase() - .contains("northstarproton") + if !VALID_NORTHSTAR_PROTON_BUILDS + .contains(&compat.clone().name.unwrap().as_str()) { return Err( - "Titanfall2 was not configured to use NorthstarProton".to_string() + "Titanfall2 was not configured to use a valid version of NorthstarProton or GE-Proton".to_string(), ); } } |