mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Old ini-manager only partially used in VFS. Global configuration used as defualt.
This commit is contained in:
parent
e8ebb005fd
commit
c0255208cc
47 changed files with 328 additions and 403 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "stdafx_gui.h"
|
||||
#include "Ini.h"
|
||||
#include "rpcs3.h"
|
||||
#include "config.h"
|
||||
#include "MainFrame.h"
|
||||
#include "git-version.h"
|
||||
|
||||
|
|
@ -182,16 +183,18 @@ void MainFrame::AddPane(wxWindow* wind, const wxString& caption, int flags)
|
|||
|
||||
void MainFrame::DoSettings(bool load)
|
||||
{
|
||||
IniEntry<std::string> ini;
|
||||
ini.Init("Settings", "MainFrameAui");
|
||||
|
||||
if(load)
|
||||
{
|
||||
m_aui_mgr.LoadPerspective(fmt::FromUTF8(ini.LoadValue(fmt::ToUTF8(m_aui_mgr.SavePerspective()))));
|
||||
// replace all '=' with '~' for ini-manager
|
||||
if(!rpcs3::config.gui.aui_mgr_perspective.value().size())
|
||||
rpcs3::config.gui.aui_mgr_perspective = fmt::replace_all(fmt::ToUTF8(m_aui_mgr.SavePerspective()), "=", "~");
|
||||
|
||||
m_aui_mgr.LoadPerspective(fmt::FromUTF8(fmt::replace_all(rpcs3::config.gui.aui_mgr_perspective.value(), "~", "=")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ini.SaveValue(fmt::ToUTF8(m_aui_mgr.SavePerspective()));
|
||||
rpcs3::config.gui.aui_mgr_perspective = fmt::replace_all(fmt::ToUTF8(m_aui_mgr.SavePerspective()), "=", "~");
|
||||
rpcs3::config.save();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue