diff --git a/rpcs3/Emu/Io/MouseHandler.cpp b/rpcs3/Emu/Io/MouseHandler.cpp index adb1c479fb..0194d8e7e9 100644 --- a/rpcs3/Emu/Io/MouseHandler.cpp +++ b/rpcs3/Emu/Io/MouseHandler.cpp @@ -105,7 +105,7 @@ void MouseHandlerBase::Scroll(u32 index, s8 x, s8 y) } } -void MouseHandlerBase::Move(u32 index, s32 x_pos_new, s32 y_pos_new, s32 x_max, s32 y_max, const bool is_relative, s32 x_delta, s32 y_delta) +void MouseHandlerBase::Move(u32 index, s32 x_pos_new, s32 y_pos_new, s32 x_max, s32 y_max, bool is_relative, s32 x_delta, s32 y_delta) { std::lock_guard lock(mutex); diff --git a/rpcs3/Emu/Io/MouseHandler.h b/rpcs3/Emu/Io/MouseHandler.h index 3467b821eb..007f71ee23 100644 --- a/rpcs3/Emu/Io/MouseHandler.h +++ b/rpcs3/Emu/Io/MouseHandler.h @@ -145,7 +145,7 @@ public: void Button(u32 index, u8 button, bool pressed); void Scroll(u32 index, s8 x, s8 y); - void Move(u32 index, s32 x_pos_new, s32 y_pos_new, s32 x_max, s32 y_max, const bool is_relative = false, s32 x_delta = 0, s32 y_delta = 0); + void Move(u32 index, s32 x_pos_new, s32 y_pos_new, s32 x_max, s32 y_max, bool is_relative = false, s32 x_delta = 0, s32 y_delta = 0); void SetIntercepted(bool intercepted); diff --git a/rpcs3/main_application.cpp b/rpcs3/main_application.cpp index 8d012d2df5..fcf7a3e879 100644 --- a/rpcs3/main_application.cpp +++ b/rpcs3/main_application.cpp @@ -138,31 +138,28 @@ EmuCallbacks main_application::CreateCallbacks() callbacks.init_mouse_handler = [this]() { - switch (g_cfg.io.mouse.get()) - { - case mouse_handler::null: + mouse_handler handler = g_cfg.io.mouse; + + if (handler == mouse_handler::null) { switch (g_cfg.io.move) { case move_handler::mouse: - { - basic_mouse_handler* ret = g_fxo->init(Emu.DeserialManager()); - ret->moveToThread(get_thread()); - ret->SetTargetWindow(m_game_window); + handler = mouse_handler::basic; break; - } case move_handler::raw_mouse: - { - g_fxo->init(Emu.DeserialManager()); + handler = mouse_handler::raw; break; - } default: - { - g_fxo->init(Emu.DeserialManager()); break; } - } + } + switch (handler) + { + case mouse_handler::null: + { + g_fxo->init(Emu.DeserialManager()); break; } case mouse_handler::basic: