2024-01-20 06:17:21 +00:00
|
|
|
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
|
2023-12-22 11:57:49 +00:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0+
|
2021-12-13 12:12:54 +00:00
|
|
|
|
2022-06-28 11:41:24 +00:00
|
|
|
#include "MainWindow.h"
|
2021-12-13 12:12:54 +00:00
|
|
|
#include "QtHost.h"
|
2022-02-15 14:29:18 +00:00
|
|
|
#include "QtUtils.h"
|
2023-05-13 04:30:41 +00:00
|
|
|
#include "Settings/AchievementSettingsWidget.h"
|
|
|
|
#include "Settings/AdvancedSettingsWidget.h"
|
|
|
|
#include "Settings/AudioSettingsWidget.h"
|
|
|
|
#include "Settings/BIOSSettingsWidget.h"
|
|
|
|
#include "Settings/DEV9SettingsWidget.h"
|
|
|
|
#include "Settings/DebugSettingsWidget.h"
|
|
|
|
#include "Settings/EmulationSettingsWidget.h"
|
|
|
|
#include "Settings/FolderSettingsWidget.h"
|
2023-05-25 16:24:01 +00:00
|
|
|
#include "Settings/GameCheatSettingsWidget.h"
|
2023-05-13 04:30:41 +00:00
|
|
|
#include "Settings/GameFixSettingsWidget.h"
|
|
|
|
#include "Settings/GameListSettingsWidget.h"
|
2023-05-25 16:24:01 +00:00
|
|
|
#include "Settings/GamePatchSettingsWidget.h"
|
2023-05-13 04:30:41 +00:00
|
|
|
#include "Settings/GameSummaryWidget.h"
|
|
|
|
#include "Settings/GraphicsSettingsWidget.h"
|
|
|
|
#include "Settings/HotkeySettingsWidget.h"
|
|
|
|
#include "Settings/InterfaceSettingsWidget.h"
|
|
|
|
#include "Settings/MemoryCardSettingsWidget.h"
|
2023-10-14 08:45:09 +00:00
|
|
|
#include "SettingsWindow.h"
|
2021-12-13 12:12:54 +00:00
|
|
|
|
2023-05-13 04:30:41 +00:00
|
|
|
#include "pcsx2/Achievements.h"
|
|
|
|
#include "pcsx2/GameList.h"
|
|
|
|
#include "pcsx2/Host.h"
|
|
|
|
#include "pcsx2/INISettingsInterface.h"
|
2021-12-13 12:12:54 +00:00
|
|
|
|
2023-05-13 04:30:41 +00:00
|
|
|
#include "common/FileSystem.h"
|
|
|
|
#include "common/Path.h"
|
|
|
|
#include "common/StringUtil.h"
|
2022-04-18 13:35:14 +00:00
|
|
|
|
2024-01-20 06:17:21 +00:00
|
|
|
#include <QtGui/QWheelEvent>
|
2021-12-13 12:12:54 +00:00
|
|
|
#include <QtWidgets/QMessageBox>
|
2024-01-20 06:17:21 +00:00
|
|
|
#include <QtWidgets/QScrollBar>
|
2021-12-13 12:12:54 +00:00
|
|
|
#include <QtWidgets/QTextEdit>
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
static QList<SettingsWindow*> s_open_game_properties_dialogs;
|
2021-12-13 12:12:54 +00:00
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
SettingsWindow::SettingsWindow()
|
|
|
|
: QWidget(nullptr)
|
2023-07-20 09:12:17 +00:00
|
|
|
, m_disc_crc(0)
|
2021-12-13 12:12:54 +00:00
|
|
|
{
|
2022-02-15 14:29:18 +00:00
|
|
|
setupUi(nullptr);
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
SettingsWindow::SettingsWindow(std::unique_ptr<INISettingsInterface> sif, const GameList::Entry* game,
|
2023-07-23 18:38:17 +00:00
|
|
|
std::string serial, u32 disc_crc, QString filename)
|
2023-10-14 08:45:09 +00:00
|
|
|
: QWidget(nullptr)
|
2022-02-15 14:29:18 +00:00
|
|
|
, m_sif(std::move(sif))
|
2023-08-11 17:00:57 +00:00
|
|
|
, m_filename(std::move(filename))
|
2023-09-04 11:14:39 +00:00
|
|
|
, m_game_list_filename(game ? game->path : std::string())
|
2023-07-20 09:12:17 +00:00
|
|
|
, m_serial(std::move(serial))
|
|
|
|
, m_disc_crc(disc_crc)
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
setupUi(game);
|
|
|
|
|
|
|
|
s_open_game_properties_dialogs.push_back(this);
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
SettingsInterface* SettingsWindow::getSettingsInterface() const
|
2023-09-04 11:14:39 +00:00
|
|
|
{
|
|
|
|
return m_sif.get();
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::setupUi(const GameList::Entry* game)
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
2022-11-23 13:20:49 +00:00
|
|
|
const bool show_advanced_settings = QtHost::ShouldShowAdvancedSettings();
|
2021-12-13 12:12:54 +00:00
|
|
|
|
2022-02-15 14:29:18 +00:00
|
|
|
m_ui.setupUi(this);
|
2021-12-13 12:12:54 +00:00
|
|
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
|
|
|
2022-10-22 03:43:26 +00:00
|
|
|
if (isPerGameSettings())
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
2022-09-27 12:57:21 +00:00
|
|
|
QString summary = tr("<strong>Summary</strong><hr>This page shows details about the selected game. Changing the Input "
|
2023-07-23 18:38:17 +00:00
|
|
|
"Profile will set the controller binding scheme for this game to whichever profile is chosen, instead "
|
|
|
|
"of the default (Shared) configuration. The track list and dump verification can be used to determine "
|
|
|
|
"if your disc image matches a known good dump. If it does not match, the game may be broken.");
|
2022-02-15 14:59:15 +00:00
|
|
|
if (game)
|
|
|
|
{
|
2023-07-20 09:12:17 +00:00
|
|
|
addWidget(new GameSummaryWidget(game, this, m_ui.settingsContainer), tr("Summary"),
|
|
|
|
QStringLiteral("file-list-line"), std::move(summary));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
QLabel* placeholder_label =
|
|
|
|
new QLabel(tr("Summary is unavailable for files not present in game list."), m_ui.settingsContainer);
|
|
|
|
placeholder_label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
|
|
|
addWidget(placeholder_label, tr("Summary"), QStringLiteral("file-list-line"), std::move(summary));
|
2022-02-15 14:59:15 +00:00
|
|
|
}
|
2022-02-15 14:29:18 +00:00
|
|
|
|
|
|
|
m_ui.restoreDefaultsButton->setVisible(false);
|
2023-09-04 11:14:39 +00:00
|
|
|
m_ui.footerLayout->removeWidget(m_ui.restoreDefaultsButton);
|
|
|
|
m_ui.restoreDefaultsButton->deleteLater();
|
|
|
|
m_ui.restoreDefaultsButton = nullptr;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_ui.copyGlobalSettingsButton->setVisible(false);
|
|
|
|
m_ui.footerLayout->removeWidget(m_ui.copyGlobalSettingsButton);
|
|
|
|
m_ui.copyGlobalSettingsButton->deleteLater();
|
|
|
|
m_ui.copyGlobalSettingsButton = nullptr;
|
|
|
|
|
|
|
|
m_ui.clearGameSettingsButton->setVisible(false);
|
|
|
|
m_ui.footerLayout->removeWidget(m_ui.clearGameSettingsButton);
|
|
|
|
m_ui.clearGameSettingsButton->deleteLater();
|
|
|
|
m_ui.clearGameSettingsButton = nullptr;
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
|
2022-10-22 03:43:26 +00:00
|
|
|
addWidget(m_interface_settings = new InterfaceSettingsWidget(this, m_ui.settingsContainer), tr("Interface"),
|
2023-06-03 08:16:36 +00:00
|
|
|
QStringLiteral("interface-line"),
|
2022-12-24 03:58:21 +00:00
|
|
|
tr("<strong>Interface Settings</strong><hr>These options control how the software looks and behaves.<br><br>Mouse over an option "
|
2024-01-20 06:17:21 +00:00
|
|
|
"for additional information, and Shift+Wheel to scroll this panel."));
|
2022-10-22 03:43:26 +00:00
|
|
|
|
|
|
|
// We don't include game list/bios settings in per-game settings.
|
|
|
|
if (!isPerGameSettings())
|
|
|
|
{
|
|
|
|
addWidget(m_game_list_settings = new GameListSettingsWidget(this, m_ui.settingsContainer), tr("Game List"),
|
2023-06-03 08:16:36 +00:00
|
|
|
QStringLiteral("folder-open-line"),
|
2022-12-24 03:58:21 +00:00
|
|
|
tr("<strong>Game List Settings</strong><hr>The list above shows the directories which will be searched by PCSX2 to populate "
|
|
|
|
"the game list. Search directories can be added, removed, and switched to recursive/non-recursive."));
|
2023-06-03 08:16:36 +00:00
|
|
|
addWidget(m_bios_settings = new BIOSSettingsWidget(this, m_ui.settingsContainer), tr("BIOS"), QStringLiteral("chip-line"),
|
2024-01-20 06:17:21 +00:00
|
|
|
tr("<strong>BIOS Settings</strong><hr>Configure your BIOS here.<br><br>Mouse over an option for additional information, "
|
|
|
|
"and Shift+Wheel to scroll this panel."));
|
2022-10-22 03:43:26 +00:00
|
|
|
}
|
|
|
|
|
2022-02-15 14:29:18 +00:00
|
|
|
// Common to both per-game and global settings.
|
2022-12-24 03:58:21 +00:00
|
|
|
addWidget(m_emulation_settings = new EmulationSettingsWidget(this, m_ui.settingsContainer), tr("Emulation"),
|
2023-06-03 08:16:36 +00:00
|
|
|
QStringLiteral("emulation-line"),
|
2022-12-24 03:58:21 +00:00
|
|
|
tr("<strong>Emulation Settings</strong><hr>These options determine the configuration of frame pacing and game "
|
2024-01-20 06:17:21 +00:00
|
|
|
"settings.<br><br>Mouse over an option for additional information, and Shift+Wheel to scroll this panel."));
|
2022-02-15 14:29:18 +00:00
|
|
|
|
2023-07-20 09:12:17 +00:00
|
|
|
if (isPerGameSettings())
|
2023-05-25 16:24:01 +00:00
|
|
|
{
|
2023-07-20 09:12:17 +00:00
|
|
|
addWidget(m_game_patch_settings_widget = new GamePatchSettingsWidget(this, m_ui.settingsContainer),
|
2023-07-15 05:54:56 +00:00
|
|
|
tr("Patches"), QStringLiteral("band-aid-line"),
|
2023-05-25 16:24:01 +00:00
|
|
|
tr("<strong>Patches</strong><hr>This section allows you to select optional patches to apply to the game, "
|
|
|
|
"which may provide performance, visual, or gameplay improvements."));
|
2023-07-20 09:12:17 +00:00
|
|
|
addWidget(m_game_cheat_settings_widget = new GameCheatSettingsWidget(this, m_ui.settingsContainer),
|
2023-07-15 05:54:56 +00:00
|
|
|
tr("Cheats"), QStringLiteral("cheats-line"),
|
2023-05-25 16:24:01 +00:00
|
|
|
tr("<strong>Cheats</strong><hr>This section allows you to select which cheats you wish to enable. You "
|
|
|
|
"cannot enable/disable cheats without labels for old-format pnach files, those will automatically "
|
|
|
|
"activate if the main cheat enable option is checked."));
|
|
|
|
}
|
|
|
|
|
2022-11-23 13:20:49 +00:00
|
|
|
// Only show the game fixes for per-game settings, there's really no reason to be setting them globally.
|
|
|
|
if (show_advanced_settings && isPerGameSettings())
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
2023-03-13 00:34:20 +00:00
|
|
|
addWidget(m_game_fix_settings_widget = new GameFixSettingsWidget(this, m_ui.settingsContainer), tr("Game Fixes"),
|
2023-07-15 05:54:56 +00:00
|
|
|
QStringLiteral("tools-line"),
|
2023-03-13 00:34:20 +00:00
|
|
|
tr("<strong>Game Fixes Settings</strong><hr>Game Fixes can work around incorrect emulation in some titles.<br>However, they can "
|
2022-12-24 03:58:21 +00:00
|
|
|
"also cause problems in games if used incorrectly.<br>It is best to leave them all disabled unless advised otherwise."));
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
|
2023-06-03 08:16:36 +00:00
|
|
|
addWidget(m_graphics_settings = new GraphicsSettingsWidget(this, m_ui.settingsContainer), tr("Graphics"), QStringLiteral("image-fill"),
|
2022-12-24 03:58:21 +00:00
|
|
|
tr("<strong>Graphics Settings</strong><hr>These options determine the configuration of the graphical output.<br><br>Mouse over an "
|
2024-01-20 06:17:21 +00:00
|
|
|
"option for additional information, and Shift+Wheel to scroll this panel."));
|
2022-03-25 09:24:27 +00:00
|
|
|
addWidget(m_audio_settings = new AudioSettingsWidget(this, m_ui.settingsContainer), tr("Audio"), QStringLiteral("volume-up-line"),
|
2022-12-24 03:58:21 +00:00
|
|
|
tr("<strong>Audio Settings</strong><hr>These options control the audio output of the console.<br><br>Mouse over an option for "
|
2024-01-20 06:17:21 +00:00
|
|
|
"additional information, and Shift+Wheel to scroll this panel."));
|
2022-03-25 09:24:41 +00:00
|
|
|
|
2023-05-29 10:42:46 +00:00
|
|
|
addWidget(m_memory_card_settings = new MemoryCardSettingsWidget(this, m_ui.settingsContainer), tr("Memory Cards"),
|
2023-06-03 08:16:36 +00:00
|
|
|
QStringLiteral("memcard-line"),
|
2023-05-29 10:42:46 +00:00
|
|
|
tr("<strong>Memory Card Settings</strong><hr>Create and configure Memory Cards here.<br><br>Mouse over an option for "
|
2024-01-20 06:17:21 +00:00
|
|
|
"additional information, and Shift+Wheel to scroll this panel."));
|
2022-04-18 13:35:14 +00:00
|
|
|
|
2023-06-17 13:23:47 +00:00
|
|
|
addWidget(m_dev9_settings = new DEV9SettingsWidget(this, m_ui.settingsContainer), tr("Network & HDD"), QStringLiteral("global-line"),
|
2022-12-24 03:58:21 +00:00
|
|
|
tr("<strong>Network & HDD Settings</strong><hr>These options control the network connectivity and internal HDD storage of the "
|
2024-01-20 06:17:21 +00:00
|
|
|
"console.<br><br>Mouse over an option for additional information, and Shift+Wheel to scroll this panel."));
|
2021-12-13 12:12:54 +00:00
|
|
|
|
2022-06-18 10:20:24 +00:00
|
|
|
if (!isPerGameSettings())
|
|
|
|
{
|
2022-12-24 03:58:21 +00:00
|
|
|
addWidget(m_folder_settings = new FolderSettingsWidget(this, m_ui.settingsContainer), tr("Folders"),
|
2023-06-03 08:16:36 +00:00
|
|
|
QStringLiteral("folder-settings-line"),
|
2022-06-18 10:20:24 +00:00
|
|
|
tr("<strong>Folder Settings</strong><hr>These options control where PCSX2 will save runtime data files."));
|
|
|
|
}
|
|
|
|
|
2022-04-18 13:35:14 +00:00
|
|
|
{
|
|
|
|
QString title = tr("Achievements");
|
|
|
|
QString icon_text(QStringLiteral("trophy-line"));
|
2022-12-24 03:58:21 +00:00
|
|
|
QString help_text =
|
|
|
|
tr("<strong>Achievements Settings</strong><hr>"
|
|
|
|
"These options control the RetroAchievements implementation in PCSX2, allowing you to earn achievements in your games.");
|
2022-04-18 13:35:14 +00:00
|
|
|
if (Achievements::IsUsingRAIntegration())
|
|
|
|
{
|
|
|
|
QLabel* placeholder_label =
|
2022-12-24 03:58:21 +00:00
|
|
|
new QLabel(tr("RAIntegration is being used, built-in RetroAchievements support is disabled."), m_ui.settingsContainer);
|
2022-04-18 13:35:14 +00:00
|
|
|
placeholder_label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
|
|
|
addWidget(placeholder_label, std::move(title), std::move(icon_text), std::move(help_text));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-12-24 03:58:21 +00:00
|
|
|
addWidget((m_achievement_settings = new AchievementSettingsWidget(this, m_ui.settingsContainer)), std::move(title),
|
|
|
|
std::move(icon_text), std::move(help_text));
|
2022-04-18 13:35:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-23 13:20:49 +00:00
|
|
|
if (show_advanced_settings)
|
|
|
|
{
|
|
|
|
addWidget(m_advanced_settings = new AdvancedSettingsWidget(this, m_ui.settingsContainer), tr("Advanced"),
|
2023-06-03 08:16:36 +00:00
|
|
|
QStringLiteral("warning-line"),
|
2022-12-24 03:58:21 +00:00
|
|
|
tr("<strong>Advanced Settings</strong><hr>These are advanced options to determine the configuration of the simulated "
|
2024-01-20 06:17:21 +00:00
|
|
|
"console.<br><br>Mouse over an option for additional information, and Shift+Wheel to scroll this panel."));
|
2022-12-24 03:58:21 +00:00
|
|
|
addWidget(m_debug_settings = new DebugSettingsWidget(this, m_ui.settingsContainer), tr("Debug"),
|
2024-01-14 14:56:29 +00:00
|
|
|
QStringLiteral("debugger-line"),
|
2022-12-24 03:58:21 +00:00
|
|
|
tr("<strong>Debug Settings</strong><hr>These are options which can be used to log internal information about the application. "
|
|
|
|
"<strong>Do not modify unless you know what you are doing</strong>, it will cause significant slowdown, and can waste large "
|
|
|
|
"amounts of disk space."));
|
2022-11-23 13:20:49 +00:00
|
|
|
}
|
|
|
|
|
2021-12-13 12:12:54 +00:00
|
|
|
m_ui.settingsCategory->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
|
|
|
m_ui.settingsCategory->setCurrentRow(0);
|
|
|
|
m_ui.settingsContainer->setCurrentIndex(0);
|
|
|
|
m_ui.helpText->setText(m_category_help_text[0]);
|
2023-10-14 08:45:09 +00:00
|
|
|
connect(m_ui.settingsCategory, &QListWidget::currentRowChanged, this, &SettingsWindow::onCategoryCurrentRowChanged);
|
|
|
|
connect(m_ui.closeButton, &QPushButton::clicked, this, &SettingsWindow::close);
|
2023-09-04 11:14:39 +00:00
|
|
|
if (m_ui.restoreDefaultsButton)
|
2023-10-14 08:45:09 +00:00
|
|
|
connect(m_ui.restoreDefaultsButton, &QPushButton::clicked, this, &SettingsWindow::onRestoreDefaultsClicked);
|
2023-09-04 11:14:39 +00:00
|
|
|
if (m_ui.copyGlobalSettingsButton)
|
2023-10-14 08:45:09 +00:00
|
|
|
connect(m_ui.copyGlobalSettingsButton, &QPushButton::clicked, this, &SettingsWindow::onCopyGlobalSettingsClicked);
|
2023-09-04 11:14:39 +00:00
|
|
|
if (m_ui.clearGameSettingsButton)
|
2023-10-14 08:45:09 +00:00
|
|
|
connect(m_ui.clearGameSettingsButton, &QPushButton::clicked, this, &SettingsWindow::onClearSettingsClicked);
|
2021-12-13 12:12:54 +00:00
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
SettingsWindow::~SettingsWindow()
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
if (isPerGameSettings())
|
|
|
|
s_open_game_properties_dialogs.removeOne(this);
|
|
|
|
}
|
2021-12-13 12:12:54 +00:00
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::closeEvent(QCloseEvent*)
|
2021-12-13 12:12:54 +00:00
|
|
|
{
|
2022-02-15 14:29:18 +00:00
|
|
|
// we need to clean up ourselves, since we're not modal
|
|
|
|
if (isPerGameSettings())
|
|
|
|
deleteLater();
|
2021-12-13 12:12:54 +00:00
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
QString SettingsWindow::getCategory() const
|
2022-09-07 07:44:10 +00:00
|
|
|
{
|
|
|
|
return m_ui.settingsCategory->item(m_ui.settingsCategory->currentRow())->text();
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::setCategory(const char* category)
|
2021-12-13 12:12:54 +00:00
|
|
|
{
|
2022-02-15 14:29:18 +00:00
|
|
|
// the titles in the category list will be translated.
|
2023-12-17 03:53:25 +00:00
|
|
|
const QString translated_category(tr(category));
|
2021-12-13 12:12:54 +00:00
|
|
|
|
2022-02-15 14:29:18 +00:00
|
|
|
for (int i = 0; i < m_ui.settingsCategory->count(); i++)
|
|
|
|
{
|
|
|
|
if (translated_category == m_ui.settingsCategory->item(i)->text())
|
|
|
|
{
|
|
|
|
// will also update the visible widget
|
|
|
|
m_ui.settingsCategory->setCurrentRow(i);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2021-12-13 12:12:54 +00:00
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::onCategoryCurrentRowChanged(int row)
|
2021-12-13 12:12:54 +00:00
|
|
|
{
|
|
|
|
m_ui.settingsContainer->setCurrentIndex(row);
|
|
|
|
m_ui.helpText->setText(m_category_help_text[row]);
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::onRestoreDefaultsClicked()
|
2021-12-13 12:12:54 +00:00
|
|
|
{
|
2022-09-07 07:44:10 +00:00
|
|
|
QMessageBox msgbox(this);
|
2024-04-02 07:27:49 +00:00
|
|
|
msgbox.setWindowIcon(QtHost::GetAppIcon());
|
2022-09-07 07:44:10 +00:00
|
|
|
msgbox.setIcon(QMessageBox::Question);
|
|
|
|
msgbox.setWindowTitle(tr("Confirm Restore Defaults"));
|
2024-03-28 16:26:57 +00:00
|
|
|
msgbox.setText(tr("Are you sure you want to restore the default settings? Any existing preferences will be lost."));
|
2022-09-07 07:44:10 +00:00
|
|
|
|
|
|
|
QCheckBox* ui_cb = new QCheckBox(tr("Reset UI Settings"), &msgbox);
|
|
|
|
msgbox.setCheckBox(ui_cb);
|
|
|
|
msgbox.addButton(QMessageBox::Yes);
|
|
|
|
msgbox.addButton(QMessageBox::No);
|
|
|
|
msgbox.setDefaultButton(QMessageBox::Yes);
|
|
|
|
if (msgbox.exec() != QMessageBox::Yes)
|
2021-12-13 12:12:54 +00:00
|
|
|
return;
|
|
|
|
|
2022-09-07 07:44:10 +00:00
|
|
|
g_main_window->resetSettings(ui_cb->isChecked());
|
2021-12-13 12:12:54 +00:00
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::onCopyGlobalSettingsClicked()
|
2023-09-04 11:14:39 +00:00
|
|
|
{
|
|
|
|
if (!isPerGameSettings())
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (QMessageBox::question(this, tr("PCSX2 Settings"),
|
|
|
|
tr("The configuration for this game will be replaced by the current global settings.\n\nAny current setting values will be "
|
|
|
|
"overwritten.\n\nDo you want to continue?"),
|
|
|
|
QMessageBox::Yes, QMessageBox::No) != QMessageBox::Yes)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
auto lock = Host::GetSettingsLock();
|
|
|
|
Pcsx2Config::CopyConfiguration(m_sif.get(), *Host::Internal::GetBaseSettingsLayer());
|
|
|
|
}
|
2024-05-04 13:33:35 +00:00
|
|
|
saveAndReloadGameSettings();
|
|
|
|
|
2023-09-04 11:14:39 +00:00
|
|
|
|
|
|
|
QMessageBox::information(reopen(), tr("PCSX2 Settings"), tr("Per-game configuration copied from global settings."));
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::onClearSettingsClicked()
|
2023-09-04 11:14:39 +00:00
|
|
|
{
|
|
|
|
if (!isPerGameSettings())
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (QMessageBox::question(this, tr("PCSX2 Settings"),
|
|
|
|
tr("The configuration for this game will be cleared.\n\nAny current setting values will be lost.\n\nDo you want to continue?"),
|
|
|
|
QMessageBox::Yes, QMessageBox::No) != QMessageBox::Yes)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2024-01-01 02:40:14 +00:00
|
|
|
m_game_cheat_settings_widget->disableAllCheats();
|
|
|
|
m_game_patch_settings_widget->disableAllPatches();
|
|
|
|
|
2023-09-04 11:14:39 +00:00
|
|
|
Pcsx2Config::ClearConfiguration(m_sif.get());
|
2024-05-04 13:33:35 +00:00
|
|
|
saveAndReloadGameSettings();
|
2023-09-04 11:14:39 +00:00
|
|
|
|
|
|
|
QMessageBox::information(reopen(), tr("PCSX2 Settings"), tr("Per-game configuration cleared."));
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
SettingsWindow* SettingsWindow::reopen()
|
2023-09-04 11:14:39 +00:00
|
|
|
{
|
|
|
|
// This doesn't work for global settings, because MainWindow maintains a pointer.
|
|
|
|
if (!m_sif)
|
|
|
|
return this;
|
|
|
|
|
|
|
|
close();
|
|
|
|
|
|
|
|
std::unique_ptr<INISettingsInterface> new_sif = std::make_unique<INISettingsInterface>(m_sif->GetFileName());
|
|
|
|
if (FileSystem::FileExists(new_sif->GetFileName().c_str()))
|
|
|
|
new_sif->Load();
|
|
|
|
|
|
|
|
auto lock = GameList::GetLock();
|
|
|
|
const GameList::Entry* game = m_game_list_filename.empty() ? nullptr : GameList::GetEntryForPath(m_game_list_filename.c_str());
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
SettingsWindow* dlg = new SettingsWindow(std::move(new_sif), game, m_serial, m_disc_crc, m_filename);
|
|
|
|
dlg->QWidget::setWindowTitle(windowTitle());
|
2023-09-04 11:14:39 +00:00
|
|
|
dlg->show();
|
|
|
|
|
|
|
|
return dlg;
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::addWidget(QWidget* widget, QString title, QString icon, QString help_text)
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
const int index = m_ui.settingsCategory->count();
|
|
|
|
|
|
|
|
QListWidgetItem* item = new QListWidgetItem(m_ui.settingsCategory);
|
|
|
|
item->setText(title);
|
|
|
|
if (!icon.isEmpty())
|
|
|
|
item->setIcon(QIcon::fromTheme(icon));
|
|
|
|
|
|
|
|
m_ui.settingsContainer->addWidget(widget);
|
|
|
|
|
|
|
|
m_category_help_text[index] = std::move(help_text);
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::registerWidgetHelp(QObject* object, QString title, QString recommended_value, QString text)
|
2021-12-13 12:12:54 +00:00
|
|
|
{
|
2022-08-05 12:55:56 +00:00
|
|
|
if (!object)
|
|
|
|
return;
|
|
|
|
|
2021-12-13 12:12:54 +00:00
|
|
|
// construct rich text with formatted description
|
|
|
|
QString full_text;
|
|
|
|
full_text += "<table width='100%' cellpadding='0' cellspacing='0'><tr><td><strong>";
|
|
|
|
full_text += title;
|
|
|
|
full_text += "</strong></td><td align='right'><strong>";
|
|
|
|
full_text += tr("Recommended Value");
|
|
|
|
full_text += ": </strong>";
|
|
|
|
full_text += recommended_value;
|
|
|
|
full_text += "</td></table><hr>";
|
|
|
|
full_text += text;
|
|
|
|
|
|
|
|
m_widget_help_text_map[object] = std::move(full_text);
|
|
|
|
object->installEventFilter(this);
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
bool SettingsWindow::eventFilter(QObject* object, QEvent* event)
|
2021-12-13 12:12:54 +00:00
|
|
|
{
|
|
|
|
if (event->type() == QEvent::Enter)
|
|
|
|
{
|
|
|
|
auto iter = m_widget_help_text_map.constFind(object);
|
|
|
|
if (iter != m_widget_help_text_map.end())
|
|
|
|
{
|
|
|
|
m_current_help_widget = object;
|
|
|
|
m_ui.helpText->setText(iter.value());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (event->type() == QEvent::Leave)
|
|
|
|
{
|
|
|
|
if (m_current_help_widget)
|
|
|
|
{
|
|
|
|
m_current_help_widget = nullptr;
|
|
|
|
m_ui.helpText->setText(m_category_help_text[m_ui.settingsCategory->currentRow()]);
|
|
|
|
}
|
|
|
|
}
|
2024-01-20 06:17:21 +00:00
|
|
|
else if (event->type() == QEvent::Wheel)
|
|
|
|
{
|
|
|
|
if (handleWheelEvent(static_cast<QWheelEvent*>(event)))
|
|
|
|
return true;
|
|
|
|
}
|
2021-12-13 12:12:54 +00:00
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
return QWidget::eventFilter(object, event);
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
|
2024-01-20 06:17:21 +00:00
|
|
|
bool SettingsWindow::handleWheelEvent(QWheelEvent* event)
|
|
|
|
{
|
|
|
|
if (!(event->modifiers() & Qt::ShiftModifier))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
const int amount = event->hasPixelDelta() ? event->pixelDelta().y() : (event->angleDelta().y() / 20);
|
|
|
|
|
|
|
|
QScrollBar* sb = m_ui.helpText->verticalScrollBar();
|
|
|
|
if (!sb)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
sb->setSliderPosition(std::max(sb->sliderPosition() - amount, 0));
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SettingsWindow::wheelEvent(QWheelEvent* event)
|
|
|
|
{
|
|
|
|
if (handleWheelEvent(event))
|
|
|
|
return;
|
|
|
|
|
|
|
|
QWidget::wheelEvent(event);
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::setWindowTitle(const QString& title)
|
2023-07-23 18:38:17 +00:00
|
|
|
{
|
|
|
|
if (m_filename.isEmpty())
|
2023-10-14 08:45:09 +00:00
|
|
|
QWidget::setWindowTitle(title);
|
2023-07-23 18:38:17 +00:00
|
|
|
else
|
2023-10-14 08:45:09 +00:00
|
|
|
QWidget::setWindowTitle(QStringLiteral("%1 [%2]").arg(title, m_filename));
|
2023-07-23 18:38:17 +00:00
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
bool SettingsWindow::getEffectiveBoolValue(const char* section, const char* key, bool default_value) const
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
bool value;
|
|
|
|
if (m_sif && m_sif->GetBoolValue(section, key, &value))
|
|
|
|
return value;
|
|
|
|
else
|
2022-05-24 12:37:44 +00:00
|
|
|
return Host::GetBaseBoolSettingValue(section, key, default_value);
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
int SettingsWindow::getEffectiveIntValue(const char* section, const char* key, int default_value) const
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
int value;
|
|
|
|
if (m_sif && m_sif->GetIntValue(section, key, &value))
|
|
|
|
return value;
|
|
|
|
else
|
2022-05-24 12:37:44 +00:00
|
|
|
return Host::GetBaseIntSettingValue(section, key, default_value);
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
float SettingsWindow::getEffectiveFloatValue(const char* section, const char* key, float default_value) const
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
float value;
|
|
|
|
if (m_sif && m_sif->GetFloatValue(section, key, &value))
|
|
|
|
return value;
|
|
|
|
else
|
2022-05-24 12:37:44 +00:00
|
|
|
return Host::GetBaseFloatSettingValue(section, key, default_value);
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
std::string SettingsWindow::getEffectiveStringValue(const char* section, const char* key, const char* default_value) const
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
std::string value;
|
|
|
|
if (!m_sif || !m_sif->GetStringValue(section, key, &value))
|
2022-05-24 12:37:44 +00:00
|
|
|
value = Host::GetBaseStringSettingValue(section, key, default_value);
|
2022-02-15 14:29:18 +00:00
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
std::optional<bool> SettingsWindow::getBoolValue(const char* section, const char* key, std::optional<bool> default_value) const
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
std::optional<bool> value;
|
|
|
|
if (m_sif)
|
|
|
|
{
|
|
|
|
bool bvalue;
|
|
|
|
if (m_sif->GetBoolValue(section, key, &bvalue))
|
|
|
|
value = bvalue;
|
|
|
|
else
|
|
|
|
value = default_value;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-05-24 12:37:44 +00:00
|
|
|
value = Host::GetBaseBoolSettingValue(section, key, default_value.value_or(false));
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
std::optional<int> SettingsWindow::getIntValue(const char* section, const char* key, std::optional<int> default_value) const
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
std::optional<int> value;
|
|
|
|
if (m_sif)
|
|
|
|
{
|
|
|
|
int ivalue;
|
|
|
|
if (m_sif->GetIntValue(section, key, &ivalue))
|
|
|
|
value = ivalue;
|
|
|
|
else
|
|
|
|
value = default_value;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-05-24 12:37:44 +00:00
|
|
|
value = Host::GetBaseIntSettingValue(section, key, default_value.value_or(0));
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
std::optional<float> SettingsWindow::getFloatValue(const char* section, const char* key, std::optional<float> default_value) const
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
std::optional<float> value;
|
|
|
|
if (m_sif)
|
|
|
|
{
|
|
|
|
float fvalue;
|
|
|
|
if (m_sif->GetFloatValue(section, key, &fvalue))
|
|
|
|
value = fvalue;
|
|
|
|
else
|
|
|
|
value = default_value;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-05-24 12:37:44 +00:00
|
|
|
value = Host::GetBaseFloatSettingValue(section, key, default_value.value_or(0.0f));
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
std::optional<std::string> SettingsWindow::getStringValue(
|
2022-12-24 03:58:21 +00:00
|
|
|
const char* section, const char* key, std::optional<const char*> default_value) const
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
std::optional<std::string> value;
|
|
|
|
if (m_sif)
|
|
|
|
{
|
|
|
|
std::string svalue;
|
|
|
|
if (m_sif->GetStringValue(section, key, &svalue))
|
|
|
|
value = std::move(svalue);
|
|
|
|
else if (default_value.has_value())
|
|
|
|
value = default_value.value();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-05-24 12:37:44 +00:00
|
|
|
value = Host::GetBaseStringSettingValue(section, key, default_value.value_or(""));
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::setBoolSettingValue(const char* section, const char* key, std::optional<bool> value)
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
if (m_sif)
|
|
|
|
{
|
|
|
|
value.has_value() ? m_sif->SetBoolValue(section, key, value.value()) : m_sif->DeleteValue(section, key);
|
2024-05-04 13:33:35 +00:00
|
|
|
saveAndReloadGameSettings();
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-09-07 07:44:10 +00:00
|
|
|
value.has_value() ? Host::SetBaseBoolSettingValue(section, key, value.value()) : Host::RemoveBaseSettingValue(section, key);
|
|
|
|
Host::CommitBaseSettingChanges();
|
2022-06-08 12:15:10 +00:00
|
|
|
g_emu_thread->applySettings();
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::setIntSettingValue(const char* section, const char* key, std::optional<int> value)
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
if (m_sif)
|
|
|
|
{
|
|
|
|
value.has_value() ? m_sif->SetIntValue(section, key, value.value()) : m_sif->DeleteValue(section, key);
|
2024-05-04 13:33:35 +00:00
|
|
|
saveAndReloadGameSettings();
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-09-07 07:44:10 +00:00
|
|
|
value.has_value() ? Host::SetBaseIntSettingValue(section, key, value.value()) : Host::RemoveBaseSettingValue(section, key);
|
|
|
|
Host::CommitBaseSettingChanges();
|
2022-06-08 12:15:10 +00:00
|
|
|
g_emu_thread->applySettings();
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::setFloatSettingValue(const char* section, const char* key, std::optional<float> value)
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
if (m_sif)
|
|
|
|
{
|
|
|
|
value.has_value() ? m_sif->SetFloatValue(section, key, value.value()) : m_sif->DeleteValue(section, key);
|
2024-05-04 13:33:35 +00:00
|
|
|
saveAndReloadGameSettings();
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-09-07 07:44:10 +00:00
|
|
|
value.has_value() ? Host::SetBaseFloatSettingValue(section, key, value.value()) : Host::RemoveBaseSettingValue(section, key);
|
|
|
|
Host::CommitBaseSettingChanges();
|
2022-06-08 12:15:10 +00:00
|
|
|
g_emu_thread->applySettings();
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::setStringSettingValue(const char* section, const char* key, std::optional<const char*> value)
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
if (m_sif)
|
|
|
|
{
|
2022-03-15 20:31:52 +00:00
|
|
|
value.has_value() ? m_sif->SetStringValue(section, key, value.value()) : m_sif->DeleteValue(section, key);
|
2024-05-04 13:33:35 +00:00
|
|
|
saveAndReloadGameSettings();
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-09-07 07:44:10 +00:00
|
|
|
value.has_value() ? Host::SetBaseStringSettingValue(section, key, value.value()) : Host::RemoveBaseSettingValue(section, key);
|
|
|
|
Host::CommitBaseSettingChanges();
|
2022-12-04 08:03:30 +00:00
|
|
|
g_emu_thread->applySettings();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
bool SettingsWindow::containsSettingValue(const char* section, const char* key) const
|
2023-05-29 10:42:46 +00:00
|
|
|
{
|
|
|
|
if (m_sif)
|
|
|
|
return m_sif->ContainsValue(section, key);
|
|
|
|
else
|
|
|
|
return Host::ContainsBaseSettingValue(section, key);
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::removeSettingValue(const char* section, const char* key)
|
2022-12-04 08:03:30 +00:00
|
|
|
{
|
|
|
|
if (m_sif)
|
|
|
|
{
|
|
|
|
m_sif->DeleteValue(section, key);
|
2024-05-04 13:33:35 +00:00
|
|
|
saveAndReloadGameSettings();
|
2022-12-04 08:03:30 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Host::RemoveBaseSettingValue(section, key);
|
|
|
|
Host::CommitBaseSettingChanges();
|
2022-06-08 12:15:10 +00:00
|
|
|
g_emu_thread->applySettings();
|
2022-02-15 14:29:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-04 13:33:35 +00:00
|
|
|
void SettingsWindow::saveAndReloadGameSettings()
|
|
|
|
{
|
|
|
|
pxAssert(m_sif);
|
|
|
|
QtHost::SaveGameSettings(m_sif.get(), true);
|
|
|
|
g_emu_thread->reloadGameSettings();
|
|
|
|
}
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
void SettingsWindow::openGamePropertiesDialog(const GameList::Entry* game, const std::string_view& title, std::string serial, u32 disc_crc)
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
2023-12-28 07:00:47 +00:00
|
|
|
std::string filename = VMManager::GetGameSettingsPath(serial, disc_crc);
|
|
|
|
|
|
|
|
// check for an existing dialog with this filename
|
2023-10-14 08:45:09 +00:00
|
|
|
for (SettingsWindow* dialog : s_open_game_properties_dialogs)
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
2023-12-28 07:00:47 +00:00
|
|
|
if (dialog->isPerGameSettings() && static_cast<INISettingsInterface*>(dialog->m_sif.get())->GetFileName() == filename)
|
2022-02-15 14:29:18 +00:00
|
|
|
{
|
|
|
|
dialog->show();
|
2023-12-28 07:00:47 +00:00
|
|
|
dialog->raise();
|
|
|
|
dialog->activateWindow();
|
2022-02-15 14:29:18 +00:00
|
|
|
dialog->setFocus();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-23 18:38:17 +00:00
|
|
|
std::unique_ptr<INISettingsInterface> sif = std::make_unique<INISettingsInterface>(filename);
|
2022-02-15 14:29:18 +00:00
|
|
|
if (FileSystem::FileExists(sif->GetFileName().c_str()))
|
|
|
|
sif->Load();
|
|
|
|
|
2023-10-14 08:45:09 +00:00
|
|
|
SettingsWindow* dialog = new SettingsWindow(std::move(sif), game, std::move(serial), disc_crc, QtUtils::StringViewToQString(Path::GetFileName(filename)));
|
2023-07-23 18:38:17 +00:00
|
|
|
dialog->setWindowTitle(QtUtils::StringViewToQString(title));
|
2022-02-15 14:29:18 +00:00
|
|
|
dialog->show();
|
|
|
|
}
|
2023-09-04 11:14:39 +00:00
|
|
|
|
2023-12-18 03:47:09 +00:00
|
|
|
void SettingsWindow::closeGamePropertiesDialogs()
|
|
|
|
{
|
|
|
|
for (SettingsWindow* dialog : s_open_game_properties_dialogs)
|
|
|
|
{
|
|
|
|
dialog->close();
|
|
|
|
dialog->deleteLater();
|
|
|
|
}
|
|
|
|
}
|