From a61d5112cfdaf4b3ac9a3ef58941780a0c0ddf1b Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 28 Jul 2024 23:02:32 +0800 Subject: [PATCH] [saco] Implement/match `DIReleaseMouse()` --- saco/game/game.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/saco/game/game.cpp b/saco/game/game.cpp index f8c722e..9887783 100644 --- a/saco/game/game.cpp +++ b/saco/game/game.cpp @@ -4,6 +4,8 @@ #include "keystuff.h" #include "aimstuff.h" +#include + extern int iGtaVersion; void GameInstallHooks(); @@ -15,6 +17,8 @@ char *szGameTextMessage; int unnamed_10150340[210]; +IDirectInputDevice8 *pDirectInputMouse; + BYTE unnamed_10150688; int unnamed_1015068C; @@ -137,6 +141,16 @@ float CGame::FindGroundZForCoord(float x, float y, float z) //----------------------------------------------------------- +void DIReleaseMouse() +{ + pDirectInputMouse = *(IDirectInputDevice8**)0xC8CFA4; + //SAFE_RELEASE(pDirectInputMouse); + if(pDirectInputMouse) { + pDirectInputMouse->Release(); + *(IDirectInputDevice8**)0xC8CFA4 = NULL; + } +} + void CGame::InitGame() { // Create a buffer for game text.