mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 14:03:42 +02:00
Validate settings before run
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use crate::platform::Platform;
|
||||
use crate::platform::{Platform, SettingsValidity};
|
||||
use failure::*;
|
||||
use nom::bytes::complete::take_until;
|
||||
use std::{
|
||||
@@ -65,6 +65,16 @@ impl Platform<OriginGame, OriginErrors> for OriginPlatform {
|
||||
});
|
||||
Ok(games.collect())
|
||||
}
|
||||
|
||||
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)}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fn get_folder_mfst_file_content(game_folder_path: &Path) -> Option<String> {
|
||||
|
||||
Reference in New Issue
Block a user