|
@@ -338,10 +338,17 @@ void CSettingsView::fillValidResolutionsForScreen(int screenIndex)
|
|
bool fullscreen = settings["video"]["fullscreen"].Bool();
|
|
bool fullscreen = settings["video"]["fullscreen"].Bool();
|
|
bool realFullscreen = settings["video"]["realFullscreen"].Bool();
|
|
bool realFullscreen = settings["video"]["realFullscreen"].Bool();
|
|
|
|
|
|
|
|
+ int resX = settings["video"]["resolution"]["width"].Integer();
|
|
|
|
+ int resY = settings["video"]["resolution"]["height"].Integer();
|
|
|
|
+ QSize currentRes(resX, resY);
|
|
|
|
+
|
|
if (!fullscreen || realFullscreen)
|
|
if (!fullscreen || realFullscreen)
|
|
{
|
|
{
|
|
QVector<QSize> resolutions = findAvailableResolutions(screenIndex);
|
|
QVector<QSize> resolutions = findAvailableResolutions(screenIndex);
|
|
|
|
|
|
|
|
+ if(!resolutions.contains(currentRes))
|
|
|
|
+ resolutions.append(currentRes);
|
|
|
|
+
|
|
for(const auto & entry : resolutions)
|
|
for(const auto & entry : resolutions)
|
|
ui->comboBoxResolution->addItem(resolutionToString(entry));
|
|
ui->comboBoxResolution->addItem(resolutionToString(entry));
|
|
}
|
|
}
|
|
@@ -351,8 +358,6 @@ void CSettingsView::fillValidResolutionsForScreen(int screenIndex)
|
|
}
|
|
}
|
|
ui->comboBoxResolution->setEnabled(ui->comboBoxResolution->count() > 1);
|
|
ui->comboBoxResolution->setEnabled(ui->comboBoxResolution->count() > 1);
|
|
|
|
|
|
- int resX = settings["video"]["resolution"]["width"].Integer();
|
|
|
|
- int resY = settings["video"]["resolution"]["height"].Integer();
|
|
|
|
int resIndex = ui->comboBoxResolution->findText(resolutionToString({resX, resY}));
|
|
int resIndex = ui->comboBoxResolution->findText(resolutionToString({resX, resY}));
|
|
ui->comboBoxResolution->setCurrentIndex(resIndex);
|
|
ui->comboBoxResolution->setCurrentIndex(resIndex);
|
|
|
|
|