From e59d1c2b89e2111e9835994f7902e3e193985354 Mon Sep 17 00:00:00 2001 From: C J Silverio Date: Tue, 2 Jan 2024 13:59:10 -0800 Subject: [PATCH] Refresh settings immediately before applying them. In every case in the facade. --- src/controller/facade.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controller/facade.rs b/src/controller/facade.rs index bfc0401d..0c936856 100644 --- a/src/controller/facade.rs +++ b/src/controller/facade.rs @@ -23,14 +23,14 @@ pub fn user_settings() -> Box { /// Let's get this party started. pub fn initialize_hud() { + refresh_user_settings(); let settings = settings(); log::info!("Reading and applying settings. Your settings are:"); - let mut ctrl = control::get(); log::info!("{settings}"); Layout::refresh(); let hud = hud_layout(); - ctrl.apply_settings(); + let mut ctrl = control::get(); if settings.autofade() { log::info!("The HUD is in autofade mode and ready to go."); @@ -130,10 +130,10 @@ pub fn serialize_cycles() -> Vec { /// Cycle data loaded from cosave. pub fn cycle_loaded_from_cosave(bytes: &CxxVector, version: u32) { + refresh_user_settings(); let mut ctrl = control::get(); if let Some(cosave_cycle) = CycleData::deserialize(bytes, version) { ctrl.cycles = cosave_cycle; - ctrl.apply_settings(); ctrl.refresh_after_load(); log::info!("Cycles loaded and ready to rock."); } else {