mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
Fix deadlock in games_config
This commit is contained in:
parent
ea3a73b598
commit
bf190fd3d8
2 changed files with 9 additions and 4 deletions
|
@ -66,7 +66,7 @@ bool games_config::add_game(const std::string& key, const std::string& path)
|
|||
|
||||
if (m_save_on_dirty)
|
||||
{
|
||||
return save();
|
||||
return save_nl();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -90,10 +90,8 @@ bool games_config::add_external_hdd_game(const std::string& key, std::string& pa
|
|||
return false;
|
||||
}
|
||||
|
||||
bool games_config::save()
|
||||
bool games_config::save_nl()
|
||||
{
|
||||
std::lock_guard lock(m_mutex);
|
||||
|
||||
YAML::Emitter out;
|
||||
out << m_games;
|
||||
|
||||
|
@ -109,6 +107,12 @@ bool games_config::save()
|
|||
return false;
|
||||
}
|
||||
|
||||
bool games_config::save()
|
||||
{
|
||||
std::lock_guard lock(m_mutex);
|
||||
return save_nl();
|
||||
}
|
||||
|
||||
void games_config::load()
|
||||
{
|
||||
std::lock_guard lock(m_mutex);
|
||||
|
|
|
@ -21,6 +21,7 @@ public:
|
|||
bool save();
|
||||
|
||||
private:
|
||||
bool save_nl();
|
||||
void load();
|
||||
|
||||
std::map<std::string, std::string> m_games;
|
||||
|
|
Loading…
Add table
Reference in a new issue