mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
input: fix custom pad config removal
This commit is contained in:
parent
fe0c164de2
commit
76ac8ffbd6
@ -429,6 +429,14 @@ void cfg::map_entry::set_map(std::map<std::string, std::string>&& map)
|
|||||||
m_map = std::move(map);
|
m_map = std::move(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cfg::map_entry::erase(const std::string& key)
|
||||||
|
{
|
||||||
|
if (m_map.contains(key))
|
||||||
|
{
|
||||||
|
m_map.erase(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void cfg::map_entry::from_default()
|
void cfg::map_entry::from_default()
|
||||||
{
|
{
|
||||||
set_map({});
|
set_map({});
|
||||||
|
@ -494,6 +494,8 @@ namespace cfg
|
|||||||
void set_value(const std::string& key, const std::string& value);
|
void set_value(const std::string& key, const std::string& value);
|
||||||
void set_map(std::map<std::string, std::string>&& map);
|
void set_map(std::map<std::string, std::string>&& map);
|
||||||
|
|
||||||
|
void erase(const std::string& key);
|
||||||
|
|
||||||
void from_default() override;
|
void from_default() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1466,6 +1466,11 @@ bool game_list_frame::RemoveCustomPadConfiguration(const std::string& title_id,
|
|||||||
: tr("Remove custom pad configuration?")) != QMessageBox::Yes)
|
: tr("Remove custom pad configuration?")) != QMessageBox::Yes)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
g_cfg_profile.load();
|
||||||
|
g_cfg_profile.active_profiles.erase(title_id);
|
||||||
|
g_cfg_profile.save();
|
||||||
|
game_list_log.notice("Removed active pad profile entry for key '%s'", title_id);
|
||||||
|
|
||||||
if (QDir(qstr(config_dir)).removeRecursively())
|
if (QDir(qstr(config_dir)).removeRecursively())
|
||||||
{
|
{
|
||||||
if (game)
|
if (game)
|
||||||
|
Loading…
Reference in New Issue
Block a user