From 52dc258fcb445ddb23827a24e0a4b8539a93122f Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Mon, 9 Oct 2023 00:50:43 +0200 Subject: [PATCH] `config.speed` -> `default_speed` --- yarge-frontend-sdl/src/config.rs | 4 ++-- yarge-frontend-sdl/src/main.rs | 2 +- yarge-frontend-sdl/src/menu.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/yarge-frontend-sdl/src/config.rs b/yarge-frontend-sdl/src/config.rs index 9228911..10fc5ed 100644 --- a/yarge-frontend-sdl/src/config.rs +++ b/yarge-frontend-sdl/src/config.rs @@ -163,7 +163,7 @@ pub struct Configuration { pub last_rom: Option, pub last_path: Option, pub closed_properly: bool, - pub speed: u8, + pub default_speed: u8, pub save_slot: u8, pub dpi_scaling: bool, pub dpi_scaling_frac: bool, @@ -179,7 +179,7 @@ impl Default for Configuration { last_rom: Default::default(), last_path: Default::default(), closed_properly: true, - speed: 1, + default_speed: 1, save_slot: 0, dpi_scaling: true, dpi_scaling_frac: false, diff --git a/yarge-frontend-sdl/src/main.rs b/yarge-frontend-sdl/src/main.rs index 0915563..97138c5 100644 --- a/yarge-frontend-sdl/src/main.rs +++ b/yarge-frontend-sdl/src/main.rs @@ -58,7 +58,7 @@ struct URStorage { } impl URStorage { pub fn configure(&mut self, config: &Configuration) { - self.speed = config.speed; + self.speed = config.default_speed; } } impl Default for URStorage { diff --git a/yarge-frontend-sdl/src/menu.rs b/yarge-frontend-sdl/src/menu.rs index d7ce452..45dbef1 100644 --- a/yarge-frontend-sdl/src/menu.rs +++ b/yarge-frontend-sdl/src/menu.rs @@ -635,8 +635,8 @@ impl Menu { define_radio_item!("9x", 9, 9); define_radio_item!("10x", 10, 10); }); - define_menu_item!(&format!("Set as default ({}x)", config.speed), { - config.speed = ur_store.speed; + define_menu_item!(&format!("Set as default ({}x)", config.default_speed), { + config.default_speed = ur_store.speed; config.save_dirty().unwrap(); }); }