Skip to content

Commit

Permalink
config.speed -> default_speed
Browse files Browse the repository at this point in the history
  • Loading branch information
griffi-gh committed Oct 8, 2023
1 parent f11673e commit 52dc258
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions yarge-frontend-sdl/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ pub struct Configuration {
pub last_rom: Option<PathBuf>,
pub last_path: Option<PathBuf>,
pub closed_properly: bool,
pub speed: u8,
pub default_speed: u8,
pub save_slot: u8,
pub dpi_scaling: bool,
pub dpi_scaling_frac: bool,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion yarge-frontend-sdl/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions yarge-frontend-sdl/src/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}
Expand Down

0 comments on commit 52dc258

Please sign in to comment.