1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Launcher setting: Disable spinBoxFramerateLimit if VSync is enabled

This commit is contained in:
Alexander Wilms 2023-09-26 17:38:41 +02:00
parent bfa5ef7990
commit e33127a1f7

View File

@ -83,6 +83,7 @@ void CSettingsView::loadSettings()
ui->spinBoxInterfaceScaling->setValue(settings["video"]["resolution"]["scaling"].Float());
ui->spinBoxFramerateLimit->setValue(settings["video"]["targetfps"].Float());
ui->spinBoxFramerateLimit->setDisabled(settings["video"]["vsync"].Bool());
ui->checkBoxVSync->setChecked(settings["video"]["vsync"].Bool());
ui->spinBoxReservedArea->setValue(std::round(settings["video"]["reservedWidth"].Float() * 100));
@ -499,6 +500,7 @@ void CSettingsView::on_checkBoxVSync_stateChanged(int arg1)
{
Settings node = settings.write["video"]["vsync"];
node->Bool() = arg1;
ui->spinBoxFramerateLimit->setDisabled(settings["video"]["vsync"].Bool());
}
void CSettingsView::on_comboBoxEnemyPlayerAI_currentTextChanged(const QString &arg1)