Make trophy dialog smarter and not need the silly file. Can load all games by default now.

This commit is contained in:
Robbie 2017-10-29 22:32:51 -05:00 committed by kd-11
parent 3d0dced4bd
commit 47bacc0ef0
5 changed files with 26 additions and 42 deletions

View file

@ -249,24 +249,6 @@ void rpcs3_app::InitializeCallbacks()
return std::make_unique<trophy_notification_helper>(gameWindow);
};
callbacks.register_trophy_commid_to_ui = [=](const std::string& name)
{
// This callback writes a mapping between the trophy folder and the game itself. This is used by the trophy manager.
YAML::Node trophy_map = YAML::Load(fs::file{ fs::get_config_dir() + "/trophy_mapping.yml", fs::read + fs::create }.to_string());
if (!trophy_map.IsMap())
{
trophy_map.reset();
}
if (!trophy_map[name])
{
trophy_map[name] = Emu.GetTitle();
YAML::Emitter out;
out << trophy_map;
fs::file(fs::get_config_dir() + "/trophy_mapping.yml", fs::rewrite).write(out.c_str(), out.size());
}
};
callbacks.on_run = [=]() { OnEmulatorRun(); };
callbacks.on_pause = [=]() { OnEmulatorPause(); };
callbacks.on_resume = [=]() { OnEmulatorResume(); };