diff --git a/src/mod_loader.cpp b/src/mod_loader.cpp index 6589827..b21d600 100644 --- a/src/mod_loader.cpp +++ b/src/mod_loader.cpp @@ -1,6 +1,6 @@ #include "mod_loader.hpp" -ModLoader::open_file_stream_proc oldOpenFileStream = nullptr; +ModLoader::open_file_stream_proc ModLoader::oldOpenFileStream = nullptr; int ModLoader::pattern_size; unsigned char* ModLoader::pattern; diff --git a/src/mod_loader.hpp b/src/mod_loader.hpp index 3474404..264c294 100644 --- a/src/mod_loader.hpp +++ b/src/mod_loader.hpp @@ -12,11 +12,12 @@ class ModLoader { static bool Enable(); static void Disable(); - typedef bool(__fastcall* open_file_stream_proc)(__int64 stream, LPCSTR file_path, unsigned int flags); - private: + using open_file_stream_proc = bool(__fastcall*)(uintptr_t stream, LPCSTR file_path, unsigned int flags); + static bool __fastcall HookOpenFileStream(uintptr_t stream, LPCSTR file_path, unsigned int flags); + static open_file_stream_proc oldOpenFileStream; static int pattern_size; static unsigned char* pattern; static unsigned char* mask;