Proton support (#64)

Enable proton for heroic games
This commit is contained in:
Philip Kristoffersen
2022-03-31 17:33:33 +02:00
committed by GitHub
parent 704d5b5758
commit b58cbc51e0
24 changed files with 589 additions and 156 deletions
+11 -4
View File
@@ -51,10 +51,7 @@ impl Platform<ItchGame, ItchErrors> for ItchPlatform {
//This is done to paths dedupe
let paths: HashSet<&DbPaths> = paths.iter().collect();
let res = paths
.iter()
.filter_map(|e| dbpath_to_game(*e))
.collect();
let res = paths.iter().filter_map(|e| dbpath_to_game(*e)).collect();
Ok(res)
}
@@ -72,6 +69,16 @@ impl Platform<ItchGame, ItchErrors> for ItchPlatform {
},
}
}
#[cfg(target_os = "windows")]
fn needs_proton(&self, _input: &ItchGame) -> bool {
return false;
}
#[cfg(target_family = "unix")]
fn needs_proton(&self, input: &ItchGame) -> bool {
//We can only really guess here
return input.executable.ends_with("exe");
}
}
fn dbpath_to_game(paths: &DbPaths) -> Option<ItchGame> {