mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 15:05:59 +00:00
Added new config system
Added emulator state class Added emulator events Minor improvements
This commit is contained in:
parent
bbfca3fc0d
commit
e4f6eb04e8
20 changed files with 1435 additions and 112 deletions
45
rpcs3/config.cpp
Normal file
45
rpcs3/config.cpp
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#include "stdafx.h"
|
||||
#include "config.h"
|
||||
#include <fstream>
|
||||
|
||||
namespace rpcs3
|
||||
{
|
||||
config_t::config_t(const std::string &path_)
|
||||
{
|
||||
path(path_);
|
||||
}
|
||||
config_t::config_t(const config_t& rhs)
|
||||
{
|
||||
assign(rhs);
|
||||
}
|
||||
|
||||
config_t& config_t::operator =(const config_t& rhs)
|
||||
{
|
||||
assign(rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
void config_t::path(const std::string &new_path)
|
||||
{
|
||||
m_path = new_path;
|
||||
}
|
||||
|
||||
std::string config_t::path() const
|
||||
{
|
||||
return m_path;
|
||||
}
|
||||
|
||||
void config_t::load()
|
||||
{
|
||||
if (!m_path.empty())
|
||||
deserialize(std::ifstream{ m_path });
|
||||
}
|
||||
|
||||
void config_t::save() const
|
||||
{
|
||||
if (!m_path.empty())
|
||||
serialize(std::ofstream{ m_path });
|
||||
}
|
||||
|
||||
config_t config{ "rpcs3.new.ini" };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue