diff options
author | FearlessTobi <thm.frey@gmail.com> | 2019-09-05 02:11:37 +0200 |
---|---|---|
committer | FearlessTobi <thm.frey@gmail.com> | 2019-09-05 02:11:37 +0200 |
commit | ea8244301d2a968766bd5b171da4f29954282276 (patch) | |
tree | d34f39ef5d72d3fc86975d5e7ad3c0c5c052f6a2 /src/yuzu/configuration/configure_general.cpp | |
parent | a956d0b0eb77b92278f1ed0e421f4dd0d702033d (diff) |
yuzu/configure: move speed limiter to general
The speed limiter being a frame limiter is an implmentation detail and can be changed in the future. What user care about is that it limit the emulation speed in genenral (not just graphics but also audio+input)
Co-Authored-By: Weiyi Wang <wwylele@gmail.com>
Diffstat (limited to 'src/yuzu/configuration/configure_general.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_general.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index 727836b17..10bcd650e 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp @@ -19,6 +19,8 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent) } SetConfiguration(); + + connect(ui->toggle_frame_limit, &QCheckBox::toggled, ui->frame_limit, &QSpinBox::setEnabled); } ConfigureGeneral::~ConfigureGeneral() = default; @@ -27,6 +29,10 @@ void ConfigureGeneral::SetConfiguration() { ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing); ui->toggle_user_on_boot->setChecked(UISettings::values.select_user_on_boot); ui->theme_combobox->setCurrentIndex(ui->theme_combobox->findData(UISettings::values.theme)); + + ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit); + ui->frame_limit->setEnabled(ui->toggle_frame_limit->isChecked()); + ui->frame_limit->setValue(Settings::values.frame_limit); } void ConfigureGeneral::ApplyConfiguration() { @@ -34,6 +40,9 @@ void ConfigureGeneral::ApplyConfiguration() { UISettings::values.select_user_on_boot = ui->toggle_user_on_boot->isChecked(); UISettings::values.theme = ui->theme_combobox->itemData(ui->theme_combobox->currentIndex()).toString(); + + Settings::values.use_frame_limit = ui->toggle_frame_limit->isChecked(); + Settings::values.frame_limit = ui->frame_limit->value(); } void ConfigureGeneral::changeEvent(QEvent* event) { |