mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
UI image selection (#97)
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
use super::lutris_game::LutrisGame;
|
||||
|
||||
pub fn parse_lutris_games<'a>(input: &'a str) -> Vec<LutrisGame> {
|
||||
pub fn parse_lutris_games(input: &str) -> Vec<LutrisGame> {
|
||||
input
|
||||
.split("\n")
|
||||
.split('\n')
|
||||
.into_iter()
|
||||
.filter(|s| !s.is_empty())
|
||||
.filter_map(parse_line)
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn parse_line<'a>(input: &'a str) -> Option<LutrisGame> {
|
||||
let mut sections = input.split("|");
|
||||
fn parse_line(input: &str) -> Option<LutrisGame> {
|
||||
let mut sections = input.split('|');
|
||||
if sections.clone().count() < 4 {
|
||||
return None;
|
||||
}
|
||||
@@ -20,10 +20,10 @@ fn parse_line<'a>(input: &'a str) -> Option<LutrisGame> {
|
||||
let platform = sections.next().unwrap().trim();
|
||||
|
||||
Some(LutrisGame {
|
||||
id:id.to_string(),
|
||||
index:index.to_string(),
|
||||
name:name.to_string(),
|
||||
platform:platform.to_string(),
|
||||
id: id.to_string(),
|
||||
index: index.to_string(),
|
||||
name: name.to_string(),
|
||||
platform: platform.to_string(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ impl From<LutrisGame> for ShortcutOwned {
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
&options.as_str(),
|
||||
options.as_str(),
|
||||
)
|
||||
.to_owned()
|
||||
}
|
||||
|
||||
@@ -53,6 +53,6 @@ impl Platform<LutrisGame, Box<dyn Error>> for LutrisPlatform {
|
||||
}
|
||||
|
||||
fn needs_proton(&self, _input: &LutrisGame) -> bool {
|
||||
return false;
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use serde::{Serialize,Deserialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize,Clone)]
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
pub struct LutrisSettings {
|
||||
pub enabled: bool,
|
||||
pub executable: Option<String>,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user