-
Notifications
You must be signed in to change notification settings - Fork 0
/
no-hidden-cursor.wh.cpp
48 lines (36 loc) · 1.27 KB
/
no-hidden-cursor.wh.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
46
47
48
// ==WindhawkMod==
// @id no-hidden-cursor
// @name No Hidden Cursor
// @description Prevent programs (and games) from hiding your cursor
// @version 1.0.0
// @author ItsProfessional
// @github https://github.com/ItsProfessional
// ==/WindhawkMod==
// ==WindhawkModReadme==
/*
# No Hidden Cursor
Some video games will hide your cursor in-game.
This mod will prevent games from hiding your cursor.
## How to enable the mod for a program
In Windhawk, go to the "Advanced" tab and scroll down to
"Custom process inclusion list". In that box, put the filename of the `.exe`.
The mod will immediately apply to those programs after you click "Save".
## Known Issues / Caveats
- This mod makes **no guarantees** of anti-cheat compatibility,
and has not been tested with any games that use anti-cheat software.
*/
// ==/WindhawkModReadme==
using SetCursor_t = decltype(&SetCursor);
SetCursor_t SetCursor_Original;
HCURSOR SetCursor_Hook(HCURSOR hCursor) {
if(hCursor == NULL) return NULL;
return SetCursor_Original(hCursor);
}
BOOL Wh_ModInit() {
Wh_Log(L"Init");
Wh_SetFunctionHook((void*)SetCursor, (void*)SetCursor_Hook, (void**)&SetCursor_Original);
return TRUE;
}
void Wh_ModUninit() {
Wh_Log(L"Uninit");
}