mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
cellGem: implement real ps move handler
This commit is contained in:
parent
e7faec6b0e
commit
b89cc9b973
34 changed files with 3628 additions and 130 deletions
40
rpcs3/Input/ps_move_config.cpp
Normal file
40
rpcs3/Input/ps_move_config.cpp
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#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()
|
||||
#ifdef _WIN32
|
||||
, path(fs::get_config_dir() + "config/ps_move.yml")
|
||||
#else
|
||||
, path(fs::get_config_dir() + "ps_move.yml")
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue