citra-qt: Add customizable speed limit target (#3353)
citra-qt: Add customizable speed limit target * Update SDL config for the new frame_limit option * Made max lag time a function of target speed percent. * Added a checkbox to enable/disable frame limiter * UI: Prevent frame_limit from under/overflowing * UI: Hide target speed percent when frame limiter is off * Disable frame limit spin box when framelimit isn't enabled
This commit is contained in:
parent
33b0b5163f
commit
b002511df0
12 changed files with 155 additions and 96 deletions
|
@ -14,6 +14,8 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent)
|
|||
this->setConfiguration();
|
||||
|
||||
ui->toggle_vsync->setEnabled(!Core::System::GetInstance().IsPoweredOn());
|
||||
ui->frame_limit->setEnabled(Settings::values.use_frame_limit);
|
||||
connect(ui->toggle_frame_limit, &QCheckBox::stateChanged, ui->frame_limit, &QSpinBox::setEnabled);
|
||||
|
||||
ui->layoutBox->setEnabled(!Settings::values.custom_layout);
|
||||
}
|
||||
|
@ -96,7 +98,8 @@ void ConfigureGraphics::setConfiguration() {
|
|||
ui->resolution_factor_combobox->setCurrentIndex(
|
||||
static_cast<int>(FromResolutionFactor(Settings::values.resolution_factor)));
|
||||
ui->toggle_vsync->setChecked(Settings::values.use_vsync);
|
||||
ui->toggle_framelimit->setChecked(Settings::values.toggle_framelimit);
|
||||
ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit);
|
||||
ui->frame_limit->setValue(Settings::values.frame_limit);
|
||||
ui->layout_combobox->setCurrentIndex(static_cast<int>(Settings::values.layout_option));
|
||||
ui->swap_screen->setChecked(Settings::values.swap_screen);
|
||||
}
|
||||
|
@ -107,7 +110,8 @@ void ConfigureGraphics::applyConfiguration() {
|
|||
Settings::values.resolution_factor =
|
||||
ToResolutionFactor(static_cast<Resolution>(ui->resolution_factor_combobox->currentIndex()));
|
||||
Settings::values.use_vsync = ui->toggle_vsync->isChecked();
|
||||
Settings::values.toggle_framelimit = ui->toggle_framelimit->isChecked();
|
||||
Settings::values.use_frame_limit = ui->toggle_frame_limit->isChecked();
|
||||
Settings::values.frame_limit = ui->frame_limit->value();
|
||||
Settings::values.layout_option =
|
||||
static_cast<Settings::LayoutOption>(ui->layout_combobox->currentIndex());
|
||||
Settings::values.swap_screen = ui->swap_screen->isChecked();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue