From 50cacd97e7149d5a6fce9c9ff4456698a01b0272 Mon Sep 17 00:00:00 2001 From: Grinch_ Date: Fri, 29 Jan 2021 22:52:39 +0600 Subject: [PATCH] Fix bugs issues with CLEOImGui --- src/Hook.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Hook.cpp b/src/Hook.cpp index 6f9c49c..b988c62 100644 --- a/src/Hook.cpp +++ b/src/Hook.cpp @@ -138,6 +138,8 @@ void Hook::ShowMouse(bool state) { if (state) { + CPad::NewMouseControllerState.X = 0; + CPad::NewMouseControllerState.Y = 0; patch::SetUChar(0x6194A0, 0xC3); patch::Nop(0x53F417, 5); // don't call CPad__getMouseState patch::SetRaw(0x53F41F, (void*)"\x33\xC0\x0F\x84", 4); // disable camera mouse movement @@ -156,14 +158,13 @@ void Hook::ShowMouse(bool state) if (mouse_visibility != show_mouse) { - CPad::NewMouseControllerState.X = 0; - CPad::NewMouseControllerState.Y = 0; - // Broken in psdk Call<0x541BD0>(); // CPad::ClearMouseHistory Call<0x541DD0>(); // CPad::UpdatePads ImGui::GetIO().MouseDrawCursor = state; + CPad::NewMouseControllerState.X = 0; + CPad::NewMouseControllerState.Y = 0; mouse_visibility = show_mouse; } }