1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

Input: fix initial mouse config reload

This commit is contained in:
Megamouse 2024-08-08 05:35:23 +02:00
parent 548cc074f4
commit bc23615508
3 changed files with 14 additions and 3 deletions

View File

@ -19,9 +19,14 @@ bool mouse_config::exist() const
bool mouse_config::load()
{
g_cfg_mouse.from_default();
if (fs::file cfg_file{cfg_name, fs::read})
{
return from_string(cfg_file.to_string());
if (const std::string content = cfg_file.to_string(); !content.empty())
{
return from_string(content);
}
}
return false;

View File

@ -20,8 +20,12 @@ void basic_mouse_handler::Init(const u32 max_connect)
return;
}
g_cfg_mouse.from_default();
g_cfg_mouse.load();
if (!g_cfg_mouse.load())
{
input_log.notice("basic_mouse_handler: Could not load basic mouse config. Using defaults.");
}
g_cfg_mouse.reload_requested = true;
reload_config();

View File

@ -267,6 +267,8 @@ void raw_mouse_handler::Init(const u32 max_connect)
input_log.notice("raw_mouse_handler: Could not load raw mouse config. Using defaults.");
}
g_cfg_raw_mouse.reload_requested = true;
m_mice.clear();
m_mice.resize(max_connect);