mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-11-22 13:32:36 +01:00
Improved mouse pos fix
This commit is contained in:
parent
048999d74a
commit
94637d52f9
@ -77,7 +77,7 @@
|
|||||||
<MinimumRequiredVersion>5.0</MinimumRequiredVersion>
|
<MinimumRequiredVersion>5.0</MinimumRequiredVersion>
|
||||||
<EntryPointSymbol>
|
<EntryPointSymbol>
|
||||||
</EntryPointSymbol>
|
</EntryPointSymbol>
|
||||||
<AdditionalDependencies>Winmm.lib</AdditionalDependencies>
|
<AdditionalDependencies>Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>copy /y "$(TargetPath)" "D:\gry\Steam\steamapps\common\Grand Theft Auto 3\SilentPatchIII.asi"</Command>
|
<Command>copy /y "$(TargetPath)" "D:\gry\Steam\steamapps\common\Grand Theft Auto 3\SilentPatchIII.asi"</Command>
|
||||||
@ -108,7 +108,7 @@
|
|||||||
<MinimumRequiredVersion>5.0</MinimumRequiredVersion>
|
<MinimumRequiredVersion>5.0</MinimumRequiredVersion>
|
||||||
<EntryPointSymbol>
|
<EntryPointSymbol>
|
||||||
</EntryPointSymbol>
|
</EntryPointSymbol>
|
||||||
<AdditionalDependencies>Winmm.lib</AdditionalDependencies>
|
<AdditionalDependencies>Winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>copy /y "$(TargetPath)" "D:\gry\Steam\steamapps\common\Grand Theft Auto 3\SilentPatchIII.asi"</Command>
|
<Command>copy /y "$(TargetPath)" "D:\gry\Steam\steamapps\common\Grand Theft Auto 3\SilentPatchIII.asi"</Command>
|
||||||
|
@ -3,6 +3,20 @@
|
|||||||
#include "General.h"
|
#include "General.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
|
|
||||||
|
struct PsGlobalType
|
||||||
|
{
|
||||||
|
HWND window;
|
||||||
|
DWORD instance;
|
||||||
|
DWORD fullscreen;
|
||||||
|
DWORD lastMousePos_X;
|
||||||
|
DWORD lastMousePos_Y;
|
||||||
|
DWORD unk;
|
||||||
|
DWORD diInterface;
|
||||||
|
DWORD diMouse;
|
||||||
|
void* diDevice1;
|
||||||
|
void* diDevice2;
|
||||||
|
};
|
||||||
|
|
||||||
struct RsGlobalType
|
struct RsGlobalType
|
||||||
{
|
{
|
||||||
const char* AppName;
|
const char* AppName;
|
||||||
@ -11,12 +25,14 @@ struct RsGlobalType
|
|||||||
signed int MaximumHeight;
|
signed int MaximumHeight;
|
||||||
unsigned int frameLimit;
|
unsigned int frameLimit;
|
||||||
BOOL quit;
|
BOOL quit;
|
||||||
void* ps;
|
PsGlobalType* ps;
|
||||||
void* keyboard;
|
void* keyboard;
|
||||||
void* mouse;
|
void* mouse;
|
||||||
void* pad;
|
void* pad;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct RwV2d
|
struct RwV2d
|
||||||
{
|
{
|
||||||
float x; /**< X value*/
|
float x; /**< X value*/
|
||||||
@ -87,8 +103,11 @@ static void (* const ConstructRenderList)() = AddressByVersion<void(*)()>(0x4A76
|
|||||||
static void (* const RsMouseSetPos)(RwV2d*) = AddressByVersion<void(*)(RwV2d*)>(0x580D20, 0x581070, 0x580F70);
|
static void (* const RsMouseSetPos)(RwV2d*) = AddressByVersion<void(*)(RwV2d*)>(0x580D20, 0x581070, 0x580F70);
|
||||||
void ResetMousePos()
|
void ResetMousePos()
|
||||||
{
|
{
|
||||||
RwV2d vecPos = { RsGlobal->MaximumWidth * 0.5f, RsGlobal->MaximumHeight * 0.5f };
|
if ( RsGlobal->ps->window == GetFocus() )
|
||||||
RsMouseSetPos(&vecPos);
|
{
|
||||||
|
RwV2d vecPos = { RsGlobal->MaximumWidth * 0.5f, RsGlobal->MaximumHeight * 0.5f };
|
||||||
|
RsMouseSetPos(&vecPos);
|
||||||
|
}
|
||||||
ConstructRenderList();
|
ConstructRenderList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user