fix(settings): Properly Parse .json to .ini

Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
Collecting
2026-01-15 08:59:21 +00:00
parent 18f9a847cd
commit 986deb6dda

View File

@@ -146,7 +146,7 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st
UpdateTheme(); UpdateTheme();
auto* share_button = new QPushButton(tr("Share Settings"), this); auto* share_button = new QPushButton(tr("Share Settings"), this);
auto* use_button = new QPushButton(tr("Use Settings"), this); auto* use_button = new QPushButton(tr("Import Settings"), this);
share_button->setObjectName(QStringLiteral("share_settings_button")); share_button->setObjectName(QStringLiteral("share_settings_button"));
use_button->setObjectName(QStringLiteral("use_settings_button")); use_button->setObjectName(QStringLiteral("use_settings_button"));
@@ -154,6 +154,9 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st
share_button->setToolTip(tr("Please choose your CPU/Graphics/Advanced settings manually. " share_button->setToolTip(tr("Please choose your CPU/Graphics/Advanced settings manually. "
"This will capture your current UI selections exactly as they appear.")); "This will capture your current UI selections exactly as they appear."));
use_button->setToolTip(tr("Please select a compatible .json file to use for this game. "
"Ensure that you understand the warning of mismatching AMD/Nvidia/Intel and it may cause issues with certain settings."));
share_button->setStyleSheet(ui->trim_xci_button->styleSheet()); share_button->setStyleSheet(ui->trim_xci_button->styleSheet());
use_button->setStyleSheet(ui->trim_xci_button->styleSheet()); use_button->setStyleSheet(ui->trim_xci_button->styleSheet());
@@ -1145,12 +1148,11 @@ void ConfigurePerGame::OnUseSettings() {
continue; continue;
} }
// UNCHECK THE GLOBAL BUTTON (Unlock the setting) auto buttons = w->findChildren<QPushButton*>();
auto buttons = w->findChildren<QAbstractButton*>();
for (auto* btn : buttons) { for (auto* btn : buttons) {
QString tt = btn->toolTip().toLower(); if (btn->objectName().startsWith(QStringLiteral("RestoreButton"))) {
if (tt.contains(tr("global").toLower()) || tt.contains(QStringLiteral("restore"))) { btn->setEnabled(true);
btn->setChecked(false); btn->setVisible(true);
} }
} }