mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
per game config.yml (#2418)
This commit is contained in:
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 = []
|
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))
|
if (!is_dir(dir) && !create_path(dir))
|
||||||
{
|
{
|
||||||
|
|
|
@ -229,9 +229,9 @@ void Emulator::Load()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load custom config-1
|
// 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());
|
cfg::root.from_string(cfg_file.to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -230,8 +230,7 @@ void GameViewer::ConfigureGame(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
long i = GetFirstSelected();
|
long i = GetFirstSelected();
|
||||||
if (i < 0) return;
|
if (i < 0) return;
|
||||||
|
SettingsDialog(this, fs::get_config_dir() + "data/" + m_game_data[i].root + "/config.yml");
|
||||||
LOG_TODO(LOADER, "Configure: %s", m_game_data[i].root);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameViewer::RemoveGame(wxCommandEvent& event)
|
void GameViewer::RemoveGame(wxCommandEvent& event)
|
||||||
|
|
|
@ -553,7 +553,7 @@ void MainFrame::SendOpenCloseSysMenu(wxCommandEvent& event)
|
||||||
|
|
||||||
void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
SettingsDialog(this);
|
SettingsDialog(this,"");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainFrame::ConfigPad(wxCommandEvent& WXUNUSED(event))
|
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)
|
: wxDialog(parent, wxID_ANY, "Settings", wxDefaultPosition)
|
||||||
{
|
{
|
||||||
// Load default config
|
// Load default config
|
||||||
loaded = YAML::Load(g_cfg_defaults);
|
loaded = YAML::Load(g_cfg_defaults);
|
||||||
|
|
||||||
// Incrementally load config.yml
|
// 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());
|
loaded += YAML::Load(config.to_string());
|
||||||
|
|
||||||
std::vector<std::unique_ptr<cfg_adapter>> pads;
|
std::vector<std::unique_ptr<cfg_adapter>> pads;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
class SettingsDialog : public wxDialog
|
class SettingsDialog : public wxDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SettingsDialog(wxWindow* parent);
|
SettingsDialog(wxWindow* parent, const wxString& pergameload);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxCheckListBox* chbox_list_core_lle;
|
wxCheckListBox* chbox_list_core_lle;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue