1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2025-03-31 01:20:20 +00:00

per game config.yml ()

This commit is contained in:
georgemoralis 2017-02-23 17:08:52 +02:00 committed by Ivan
parent 5fce74a2a6
commit 3e0c356b0b
6 changed files with 9 additions and 9 deletions

@ -1166,7 +1166,7 @@ std::string fs::get_data_dir(const std::string& prefix, const std::string& locat
{
static const std::string s_dir = []
{
const std::string& dir = get_config_dir() + "/data/";
const std::string& dir = get_config_dir() + "data/";
if (!is_dir(dir) && !create_path(dir))
{

@ -229,9 +229,9 @@ void Emulator::Load()
}
// Load custom config-1
if (fs::file cfg_file{m_cache_path + "config.yml"})
if (fs::file cfg_file{ fs::get_config_dir() + "data/" + m_title_id + "/config.yml" })
{
LOG_NOTICE(LOADER, "Applying custom config (config.yml)");
LOG_NOTICE(LOADER, "Applying custom config %s", fs::get_config_dir() + "data/" + m_title_id + "/config.yml");
cfg::root.from_string(cfg_file.to_string());
}

@ -230,8 +230,7 @@ void GameViewer::ConfigureGame(wxCommandEvent& WXUNUSED(event))
{
long i = GetFirstSelected();
if (i < 0) return;
LOG_TODO(LOADER, "Configure: %s", m_game_data[i].root);
SettingsDialog(this, fs::get_config_dir() + "data/" + m_game_data[i].root + "/config.yml");
}
void GameViewer::RemoveGame(wxCommandEvent& event)

@ -553,7 +553,7 @@ void MainFrame::SendOpenCloseSysMenu(wxCommandEvent& event)
void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
{
SettingsDialog(this);
SettingsDialog(this,"");
}
void MainFrame::ConfigPad(wxCommandEvent& WXUNUSED(event))

@ -202,14 +202,15 @@ struct textctrl_pad : cfg_adapter
};
SettingsDialog::SettingsDialog(wxWindow* parent)
SettingsDialog::SettingsDialog(wxWindow* parent, const wxString& pergameload)
: wxDialog(parent, wxID_ANY, "Settings", wxDefaultPosition)
{
// Load default config
loaded = YAML::Load(g_cfg_defaults);
// Incrementally load config.yml
const fs::file config(fs::get_config_dir() + "/config.yml", fs::read + fs::write + fs::create);
const fs::file config(!pergameload.IsEmpty() ? pergameload.ToStdString() : fs::get_config_dir() + "/config.yml", fs::read + fs::write + fs::create);
loaded += YAML::Load(config.to_string());
std::vector<std::unique_ptr<cfg_adapter>> pads;

@ -3,7 +3,7 @@
class SettingsDialog : public wxDialog
{
public:
SettingsDialog(wxWindow* parent);
SettingsDialog(wxWindow* parent, const wxString& pergameload);
private:
wxCheckListBox* chbox_list_core_lle;