From 53c75ab40791b09ed95ff3651c84f29c9968ed51 Mon Sep 17 00:00:00 2001 From: Grinch_ Date: Sun, 17 Oct 2021 22:52:06 +0600 Subject: [PATCH] Fix issue with radio scroll (again) --- src/hook.cpp | 7 ++++++- tools/premake5.lua | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/hook.cpp b/src/hook.cpp index f41355a..8d21116 100644 --- a/src/hook.cpp +++ b/src/hook.cpp @@ -291,9 +291,14 @@ static int _cdecl _GetMouseState(Mouse* pMouse) if (DIMOUSE->GetDeviceState(sizeof(Mouse), pMouse) < 0) { - while (DIMOUSE->Acquire() == DIERR_NOTINITIALIZED); + if (DIMOUSE->Acquire() == DIERR_NOTINITIALIZED) + { + while (DIMOUSE->Acquire() == DIERR_NOTINITIALIZED); + } } + pMouse->wheelDelta = mouseInfo.wheelDelta; + mouseInfo.wheelDelta = 0; pMouse->buttons[0] = (GetAsyncKeyState(1) >> 8); pMouse->buttons[1] = (GetAsyncKeyState(2) >> 8); pMouse->buttons[2] = (GetAsyncKeyState(4) >> 8); diff --git a/tools/premake5.lua b/tools/premake5.lua index 8d9376f..482bdf1 100644 --- a/tools/premake5.lua +++ b/tools/premake5.lua @@ -5,8 +5,8 @@ -- Environment vars PSDK_DIR = os.getenv("PLUGIN_SDK_DIR") DX9SDK_DIR = os.getenv("DIRECTX9_SDK_DIR") -GTASA_DIR = "C:/Work/GTASanAndreas" -GTAVC_DIR = "F:/GTA Vice City" +GTASA_DIR = "F:/GTASanAndreas" +GTAVC_DIR = "E:/GTA Vice City" if (DX9SDK_DIR == nil) then error("DIRECTX9_SDK_DIR environment variable not set")