Fix windows build of heroic

This commit is contained in:
Philip Kristoffersen
2022-03-31 19:43:20 +02:00
parent b58cbc51e0
commit 5f86589f7a
+12 -1
View File
@@ -26,6 +26,17 @@ impl From<HeroicGame> for ShortcutOwned {
} }
} }
#[cfg(target_family = "unix")]
let mut install_path = game.install_path.to_string();
#[cfg(target_family = "unix")]
{
if !install_path.starts_with("\"") && !install_path.ends_with("\"") {
install_path = format!("\"{}\"", install_path);
}
}
#[cfg(target_os = "windows")]
let install_path = game.install_path.to_string();
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
let target = target_path.to_string_lossy().to_string(); let target = target_path.to_string_lossy().to_string();
@@ -33,7 +44,7 @@ impl From<HeroicGame> for ShortcutOwned {
"0", "0",
game.title.as_str(), game.title.as_str(),
&target, &target,
"", &install_path,
"", "",
"", "",
&game.launch_parameters.as_str(), &game.launch_parameters.as_str(),