-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCursor.cpp
45 lines (35 loc) · 1.01 KB
/
Cursor.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "precompiled.h"
#include "VTHook.h"
#include "Interfaces.h"
#include "Globals.h"
#include "LocalPlayer.h"
#include "Adriel/ui.hpp"
#include "Adriel/console.hpp"
UnlockCursorFn oUnlockCursor;
LockCursorFn oLockCursor;
void __stdcall Hooks::LockCursor()
{
/*if( ui::get().is_visible() ) {
using func_t = void ( __thiscall * )(void*);
GetVFunc< func_t > ( Interfaces::Surface, 66 )( Interfaces::Surface);
Interfaces::InputSystem->EnableInput( false );
return;
}
oLockCursor(Interfaces::Surface);
Interfaces::InputSystem->EnableInput( true );*/
//decrypts(0)
static auto b_once = (logger::add(LWARN, XorStr("Lock Cursor Hooked at: 0x%.8X"), oLockCursor), true);
//encrypts(0)
if (ui::get().is_visible())
{
//SDK::Interfaces::MatSurface()->UnlockCursor();
using func_t = void ( __thiscall * )(void*);
GetVFunc< func_t > ( Interfaces::Surface, 66 )( Interfaces::Surface);
return;
}
oLockCursor(Interfaces::Surface);
}
void __stdcall Hooks::UnlockCursor()
{
oUnlockCursor(Interfaces::Surface);
}