rpcsx/rpcs3/Input/ps_move_config.cpp
DH 62ad27d1e2 split rpcs3 and hle libraries
merge rpcs3 utilities
2025-04-08 19:46:57 +03:00

36 lines
712 B
C++

#include "stdafx.h"
#include "ps_move_config.h"
LOG_CHANNEL(ps_move);
cfg_ps_moves g_cfg_move;
cfg_ps_moves::cfg_ps_moves()
: cfg::node(), path(fs::get_config_dir(true) + "ps_move.yml")
{
}
bool cfg_ps_moves::load()
{
ps_move.notice("Loading PS Move config from '%s'", path);
if (fs::file cfg_file{path, fs::read})
{
return from_string(cfg_file.to_string());
}
ps_move.notice("PS Move config missing. Using default settings. Path: %s", path);
from_default();
return false;
}
void cfg_ps_moves::save() const
{
ps_move.notice("Saving PS Move config to '%s'", path);
if (!cfg::node::save(path))
{
ps_move.error("Failed to save PS Move config to '%s' (error=%s)", path, fs::g_tls_error);
}
}