diff --git a/rpcs3/Emu/Io/mouse_config.cpp b/rpcs3/Emu/Io/mouse_config.cpp index d299e43dfd..b7dcec7e59 100644 --- a/rpcs3/Emu/Io/mouse_config.cpp +++ b/rpcs3/Emu/Io/mouse_config.cpp @@ -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; diff --git a/rpcs3/Input/basic_mouse_handler.cpp b/rpcs3/Input/basic_mouse_handler.cpp index b0440f22b9..35a53bc2c0 100644 --- a/rpcs3/Input/basic_mouse_handler.cpp +++ b/rpcs3/Input/basic_mouse_handler.cpp @@ -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(); diff --git a/rpcs3/Input/raw_mouse_handler.cpp b/rpcs3/Input/raw_mouse_handler.cpp index f69e832b33..0d622a29cd 100644 --- a/rpcs3/Input/raw_mouse_handler.cpp +++ b/rpcs3/Input/raw_mouse_handler.cpp @@ -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);