mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2025-03-14 09:42:28 +01:00
Make Increase/Decrease speed hotkeys change turbo key instead of frame_limit
This commit is contained in:
parent
4a761147d1
commit
af4a60c979
@ -2552,7 +2552,6 @@ void GMainWindow::ToggleEmulationSpeed() {
|
||||
turbo_mode_active = !turbo_mode_active;
|
||||
|
||||
if (turbo_mode_active) {
|
||||
initial_frame_limit = Settings::values.frame_limit.GetValue();
|
||||
Settings::values.frame_limit.SetValue(UISettings::values.turbo_speed_slider.GetValue());
|
||||
} else {
|
||||
Settings::values.frame_limit.SetValue(initial_frame_limit);
|
||||
@ -2566,30 +2565,17 @@ void GMainWindow::ToggleEmulationSpeed() {
|
||||
void GMainWindow::AdjustSpeedLimit(bool increase) {
|
||||
const int SPEED_LIMIT_STEP = 5;
|
||||
|
||||
if (turbo_mode_active) {
|
||||
int turbo_speed = UISettings::values.turbo_speed_slider.GetValue();
|
||||
if (increase) {
|
||||
if (turbo_speed < 995) {
|
||||
UISettings::values.turbo_speed_slider.SetValue(turbo_speed + SPEED_LIMIT_STEP);
|
||||
}
|
||||
} else {
|
||||
if (turbo_speed > SPEED_LIMIT_STEP) {
|
||||
UISettings::values.turbo_speed_slider.SetValue(turbo_speed - SPEED_LIMIT_STEP);
|
||||
}
|
||||
int turbo_speed = UISettings::values.turbo_speed_slider.GetValue();
|
||||
if (increase) {
|
||||
if (turbo_speed < 995) {
|
||||
UISettings::values.turbo_speed_slider.SetValue(turbo_speed + SPEED_LIMIT_STEP);
|
||||
}
|
||||
Settings::values.frame_limit.SetValue(UISettings::values.turbo_speed_slider.GetValue());
|
||||
} else {
|
||||
int current_frame_limit = Settings::values.frame_limit.GetValue();
|
||||
if (increase) {
|
||||
if (current_frame_limit < 995) {
|
||||
Settings::values.frame_limit.SetValue(current_frame_limit + SPEED_LIMIT_STEP);
|
||||
}
|
||||
} else {
|
||||
if (current_frame_limit > SPEED_LIMIT_STEP) {
|
||||
Settings::values.frame_limit.SetValue(current_frame_limit - SPEED_LIMIT_STEP);
|
||||
}
|
||||
if (turbo_speed > SPEED_LIMIT_STEP) {
|
||||
UISettings::values.turbo_speed_slider.SetValue(turbo_speed - SPEED_LIMIT_STEP);
|
||||
}
|
||||
}
|
||||
|
||||
UpdateStatusBar();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user