mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Validate settings before run
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use super::{LegendaryGame, LegendarySettings};
|
||||
use crate::platform::Platform;
|
||||
use crate::platform::{Platform, SettingsValidity};
|
||||
use serde_json::from_str;
|
||||
use std::error::Error;
|
||||
use std::process::Command;
|
||||
@@ -37,4 +37,12 @@ impl Platform<LegendaryGame, Box<dyn Error>> for LegendaryPlatform {
|
||||
fn create_symlinks(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn settings_valid(&self) -> crate::platform::SettingsValidity {
|
||||
let shortcuts_res = self.get_shortcuts();
|
||||
match shortcuts_res {
|
||||
Ok(_) => SettingsValidity::Valid,
|
||||
Err(err) => SettingsValidity::Invalid{reason:format!("{}",err)}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user