1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

Qt: save settings dialog window state

This commit is contained in:
Megamouse 2022-02-06 11:59:50 +01:00
parent 6b370e85d5
commit 02cdf8ac63
2 changed files with 10 additions and 0 deletions

View File

@ -111,6 +111,7 @@ namespace gui
const QString patches = "Patches";
const QString localization = "Localization";
const QString pad_settings = "PadSettings";
const QString config = "Config";
const QString update_on = "true";
const QString update_off = "false";
@ -239,6 +240,8 @@ namespace gui
const gui_save um_geometry = gui_save(users, "geometry", QByteArray());
const gui_save cfg_geometry = gui_save(config, "geometry", QByteArray());
const gui_save loc_language = gui_save(localization, "language", "en");
const gui_save pads_show_emulated = gui_save(pad_settings, "show_emulated_values", false);

View File

@ -1994,10 +1994,17 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
m_emu_settings->EnhanceComboBox(ui->combo_num_ppu_threads, emu_settings_type::NumPPUThreads, true);
SubscribeTooltip(ui->gb_num_ppu_threads, tooltips.settings.num_ppu_threads);
if (!restoreGeometry(m_gui_settings->GetValue(gui::cfg_geometry).toByteArray()))
{
// Ignore. This will most likely only fail if the setting doesn't contain any values
}
}
settings_dialog::~settings_dialog()
{
m_gui_settings->SetValue(gui::cfg_geometry, saveGeometry());
delete ui;
}