mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 01:08:39 +12:00
input: fix custom pad config saving
This commit is contained in:
parent
76ac8ffbd6
commit
17fb601c02
1 changed files with 7 additions and 14 deletions
|
@ -79,10 +79,10 @@ pad_settings_dialog::pad_settings_dialog(std::shared_ptr<gui_settings> gui_setti
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load profiles
|
// Load profiles
|
||||||
|
g_cfg_profile.load();
|
||||||
|
|
||||||
if (m_title_id.empty())
|
if (m_title_id.empty())
|
||||||
{
|
{
|
||||||
g_cfg_profile.load();
|
|
||||||
|
|
||||||
const QString profile_dir = qstr(rpcs3::utils::get_input_config_dir(m_title_id));
|
const QString profile_dir = qstr(rpcs3::utils::get_input_config_dir(m_title_id));
|
||||||
QStringList profiles = gui::utils::get_dir_entries(QDir(profile_dir), QStringList() << "*.yml");
|
QStringList profiles = gui::utils::get_dir_entries(QDir(profile_dir), QStringList() << "*.yml");
|
||||||
QString active_profile = qstr(g_cfg_profile.active_profiles.get_value(g_cfg_profile.global_key));
|
QString active_profile = qstr(g_cfg_profile.active_profiles.get_value(g_cfg_profile.global_key));
|
||||||
|
@ -108,8 +108,6 @@ pad_settings_dialog::pad_settings_dialog(std::shared_ptr<gui_settings> gui_setti
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_cfg_profile.from_default();
|
|
||||||
|
|
||||||
ui->chooseProfile->addItem(qstr(m_title_id));
|
ui->chooseProfile->addItem(qstr(m_title_id));
|
||||||
ui->gb_profiles->setEnabled(false);
|
ui->gb_profiles->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
@ -1633,17 +1631,12 @@ void pad_settings_dialog::SaveExit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_title_id.empty())
|
const std::string profile_key = m_title_id.empty() ? g_cfg_profile.global_key : m_title_id;
|
||||||
{
|
|
||||||
g_cfg_profile.active_profiles.set_value(g_cfg_profile.global_key, m_profile);
|
|
||||||
g_cfg_profile.save();
|
|
||||||
|
|
||||||
g_cfg_input.save(m_title_id, m_profile);
|
g_cfg_profile.active_profiles.set_value(profile_key, m_profile);
|
||||||
}
|
g_cfg_profile.save();
|
||||||
else
|
|
||||||
{
|
g_cfg_input.save(m_title_id, m_profile);
|
||||||
g_cfg_input.save(m_title_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue