File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,15 @@ FARPROC originalFunctions[21];
77
88DWORD WINAPI HookThread (LPVOID lpParam)
99{
10- originalDll = LoadLibrary (" C:\\ Windows\\ System32\\ dxgi.dll" );
10+ Sleep (5000 );
11+ std::string systemPath = " " ;
12+ char dummy[1 ];
13+ UINT pathLength = GetSystemDirectoryA (dummy, 1 );
14+ systemPath.resize (pathLength);
15+ LPSTR lpSystemPath = const_cast <char *>(systemPath.c_str ());
16+ GetSystemDirectoryA (lpSystemPath, systemPath.size ());
17+ systemPath = lpSystemPath;
18+ originalDll = LoadLibraryA (std::string (systemPath + " \\ dxgi.dll" ).c_str ());
1119 if (originalDll)
1220 {
1321 // Set function addresses we need for forward exporting
Original file line number Diff line number Diff line change 11#pragma once
22
33#include < string>
4+ #include < cstdarg>
45
56class Logger
67{
@@ -12,7 +13,7 @@ class Logger
1213 FILE* logFile = LogFile (nullptr );
1314 if (logFile == nullptr )
1415 {
15- fopen_s (&logFile, " hook_log .txt" , " w" );
16+ fopen_s (&logFile, " directx_hook_log .txt" , " w" );
1617 LogFile (logFile);
1718 }
1819 }
Original file line number Diff line number Diff line change 11## DirectXHook + Overlay Framework
22This is a DirectX hook that works with DirectX 11 and DirectX 12. A straightforward but primitive overlay framework is included.
33
4+ ** The readme is a little bit outdated because I restructured the code for higher stability a while back.**
5+
46### Overlay examples
57#### A mod for Monster Hunter Rise, [ "Rise DPS Meter" found on NexusMods] ( https://www.nexusmods.com/monsterhunterrise/mods/289 )
68
You can’t perform that action at this time.
0 commit comments