diff --git a/src/menu/settings_menu.rs b/src/menu/settings_menu.rs index 21aede1..046f335 100644 --- a/src/menu/settings_menu.rs +++ b/src/menu/settings_menu.rs @@ -670,7 +670,8 @@ impl SettingsMenu { let _ = state.settings.save(ctx); } } - MenuSelectionResult::Selected(SoundMenuEntry::BGMInterpolation, toggle) => { + MenuSelectionResult::Selected(SoundMenuEntry::BGMInterpolation, toggle) + | MenuSelectionResult::Right(SoundMenuEntry::BGMInterpolation, toggle, _) => { if let MenuEntry::DescriptiveOptions(_, value, _, _) = toggle { let (new_mode, new_value) = match *value { 0 => (InterpolationMode::Linear, 1), @@ -679,11 +680,26 @@ impl SettingsMenu { 3 => (InterpolationMode::Polyphase, 4), _ => (InterpolationMode::Nearest, 0), }; + + *value = new_value; + state.settings.organya_interpolation = new_mode; + state.sound_manager.set_org_interpolation(new_mode); + let _ = state.settings.save(ctx); + } + } + MenuSelectionResult::Left(SoundMenuEntry::BGMInterpolation, toggle, _) => { + if let MenuEntry::DescriptiveOptions(_, value, _, _) = toggle { + let (new_mode, new_value) = match *value { + 0 => (InterpolationMode::Polyphase, 4), + 1 => (InterpolationMode::Nearest, 0), + 2 => (InterpolationMode::Linear, 1), + 3 => (InterpolationMode::Cosine, 2), + _ => (InterpolationMode::Cubic, 3), + }; *value = new_value; state.settings.organya_interpolation = new_mode; state.sound_manager.set_org_interpolation(new_mode); - let _ = state.settings.save(ctx); } }