mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
Input: fix initial mouse config reload
This commit is contained in:
parent
548cc074f4
commit
bc23615508
@ -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;
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user