mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 22:41:25 +12:00
Qt: Fix Resolution combobox default value
This commit is contained in:
parent
b5014d56ab
commit
5ca2b1200d
1 changed files with 13 additions and 7 deletions
|
@ -342,16 +342,22 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const int res_index = ui->resBox->findData("1280x720");
|
for (int i = 0; i < ui->resBox->count(); i++)
|
||||||
if (res_index >= 0)
|
|
||||||
{
|
{
|
||||||
// Rename the default resolution for users
|
const QVariantList var_list = ui->resBox->itemData(i).toList();
|
||||||
ui->resBox->setItemText(res_index, tr("1280x720 (Recommended)", "Resolution"));
|
ASSERT(var_list.size() == 2 && var_list[0].canConvert<QString>());
|
||||||
|
|
||||||
// Set the current selection to the default if the original setting wasn't valid
|
if (var_list[0].toString() == "1280x720")
|
||||||
if (saved_index_removed)
|
|
||||||
{
|
{
|
||||||
ui->resBox->setCurrentIndex(res_index);
|
// Rename the default resolution for users
|
||||||
|
ui->resBox->setItemText(i, tr("1280x720 (Recommended)", "Resolution"));
|
||||||
|
|
||||||
|
// Set the current selection to the default if the original setting wasn't valid
|
||||||
|
if (saved_index_removed)
|
||||||
|
{
|
||||||
|
ui->resBox->setCurrentIndex(i);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue