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
+10 -3
View File
@@ -9,7 +9,6 @@ pub struct LutrisPlatform {
pub settings: LutrisSettings,
}
impl Platform<LutrisGame, Box<dyn Error>> for LutrisPlatform {
fn enabled(&self) -> bool {
self.settings.enabled
@@ -21,10 +20,14 @@ impl Platform<LutrisGame, Box<dyn Error>> for LutrisPlatform {
fn get_shortcuts(&self) -> Result<Vec<LutrisGame>, Box<dyn Error>> {
let default_lutris_exe = "lutris".to_string();
let lutris_executable = self.settings.executable.as_ref().unwrap_or(&default_lutris_exe);
let lutris_executable = self
.settings
.executable
.as_ref()
.unwrap_or(&default_lutris_exe);
let lutris_command = Command::new(lutris_executable).arg("-lo").output()?;
let output = String::from_utf8_lossy(&lutris_command.stdout).to_string();
let games = parse_lutris_games(output.as_str());
let games = parse_lutris_games(output.as_str());
let mut res = vec![];
for game in games {
if game.platform != "steam" {
@@ -48,4 +51,8 @@ impl Platform<LutrisGame, Box<dyn Error>> for LutrisPlatform {
},
}
}
fn needs_proton(&self, _input: &LutrisGame) -> bool {
return false;
}
}