mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2025-03-13 09:12:27 +01:00
Improve AdjustSpeedLimit
- Set frameskip value directly - Bypass if turbo mode isn't active
This commit is contained in:
parent
835b4ce0a2
commit
f7a670cc29
@ -2580,20 +2580,28 @@ void GMainWindow::ToggleEmulationSpeed() {
|
||||
}
|
||||
|
||||
void GMainWindow::AdjustSpeedLimit(bool increase) {
|
||||
const int SPEED_LIMIT_STEP = 5;
|
||||
if (!turbo_mode_active) {
|
||||
return;
|
||||
}
|
||||
|
||||
const int SPEED_LIMIT_STEP = 5;
|
||||
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(turbo_speed + SPEED_LIMIT_STEP);
|
||||
}
|
||||
} else {
|
||||
if (turbo_speed > SPEED_LIMIT_STEP) {
|
||||
UISettings::values.turbo_speed_slider.SetValue(turbo_speed - SPEED_LIMIT_STEP);
|
||||
Settings::values.frame_limit.SetValue(turbo_speed - SPEED_LIMIT_STEP);
|
||||
}
|
||||
}
|
||||
|
||||
UpdateStatusBar();
|
||||
if (turbo_mode_active) {
|
||||
UpdateStatusBar();
|
||||
}
|
||||
}
|
||||
|
||||
void GMainWindow::ToggleScreenLayout() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user