From 501804854c3db757231920a4203831f26a91763d Mon Sep 17 00:00:00 2001 From: jer Date: Sat, 11 Nov 2023 06:45:45 +1100 Subject: [PATCH] hotfix remove logic bug --- src/main.rs | 7 ++----- src/system/config.rs | 20 -------------------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5690aba..04ca96b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,12 +12,9 @@ use shadplay::{plugin::ShadPlayPlugin, system::config::UserConfig, utils::AppSta fn main() { // Get UserConfig for the Shadplay window dimensions, decorations toggle etc. let path = UserConfig::get_config_path(); - let user_config = match UserConfig::load_from_toml(&path) { + let user_config = match UserConfig::load_from_toml(path) { Ok(config) => config, - Err(_) => { - let default_config = UserConfig::default(); - default_config - } + Err(_) => UserConfig::default(), }; let user_cfg_window = user_config.create_window_settings(); diff --git a/src/system/config.rs b/src/system/config.rs index 40e4a34..b204ba0 100644 --- a/src/system/config.rs +++ b/src/system/config.rs @@ -84,26 +84,6 @@ impl UserConfig { Ok(config) } - pub fn config_is_valid(&self) -> bool { - // Check that the window dimensions are positive numbers - if self.window_dims.0 <= 0.0 || self.window_dims.1 <= 0.0 { - return false; - } - - if self.last_updated >= 1 << 63 { - return false; - } - - if self.decorations == true || self.decorations == false { - return false; - } - - if self.always_on_top == true || self.always_on_top == false { - return false; - } - - true - } pub fn create_window_settings(&self) -> Window { Window { title: "shadplay".into(),