diff --git a/Amalgam/src/Features/ImGui/Menu/Menu.cpp b/Amalgam/src/Features/ImGui/Menu/Menu.cpp index 66b7b6c..386d306 100644 --- a/Amalgam/src/Features/ImGui/Menu/Menu.cpp +++ b/Amalgam/src/Features/ImGui/Menu/Menu.cpp @@ -2307,7 +2307,8 @@ void CMenu::Render() AddDraggable("Conditions", Vars::Menu::ConditionsDisplay, FGet(Vars::Menu::Indicators) & (1 << 4)); AddDraggable("Seed prediction", Vars::Menu::SeedPredictionDisplay, FGet(Vars::Menu::Indicators) & (1 << 5)); - F::Render.Cursor = GetMouseCursor(); + //F::Render.Cursor = GetMouseCursor(); + F::Render.m_iCursor.store(ImGui::GetMouseCursor()); } else mActives.clear(); diff --git a/Amalgam/src/Features/ImGui/Render.cpp b/Amalgam/src/Features/ImGui/Render.cpp index 624e04d..85a0ecd 100644 --- a/Amalgam/src/Features/ImGui/Render.cpp +++ b/Amalgam/src/Features/ImGui/Render.cpp @@ -30,7 +30,7 @@ void CRender::Render(IDirect3DDevice9* pDevice) PushFont(FontRegular); F::Menu.Render(); - + PopFont(); EndFrame(); diff --git a/Amalgam/src/Features/ImGui/Render.h b/Amalgam/src/Features/ImGui/Render.h index 91b2e4a..610a1da 100644 --- a/Amalgam/src/Features/ImGui/Render.h +++ b/Amalgam/src/Features/ImGui/Render.h @@ -3,6 +3,8 @@ #include #include +#include + class CRender { public: @@ -12,7 +14,7 @@ public: void LoadColors(); void LoadStyle(); - int Cursor = 2; + std::atomic m_iCursor = ATOMIC_VAR_INIT(0); // Colors ImColor Accent = { 255, 101, 101 }; diff --git a/Amalgam/src/Hooks/Direct3DDevice9_Present.cpp b/Amalgam/src/Hooks/Direct3DDevice9_Present.cpp index 1397277..657864c 100644 --- a/Amalgam/src/Hooks/Direct3DDevice9_Present.cpp +++ b/Amalgam/src/Hooks/Direct3DDevice9_Present.cpp @@ -82,7 +82,8 @@ MAKE_HOOK(VGuiSurface_SetCursor, U::Memory.GetVFunc(I::MatSystemSurface, 51), vo { if (F::Menu.IsOpen) { - switch (F::Render.Cursor) + auto iCursor = F::Render.m_iCursor.load(); + switch(iCursor) { case 0: cursor = 2; break; case 1: cursor = 3; break;