Fix erroneous definition for khook global var

This commit is contained in:
Kenzzer 2025-04-29 20:17:46 +00:00
parent c5fd003900
commit a88a34d46b
No known key found for this signature in database
GPG Key ID: 64C3FD4332686DC1
2 changed files with 4 additions and 4 deletions

View File

@ -494,7 +494,7 @@ class IKHook;
ISmmAPI *g_SMAPI = NULL; \
ISmmPlugin *g_PLAPI = NULL; \
PluginId g_PLID = (PluginId)0; \
KHook::IKHook* __exported__khook = nullptr; \
namespace KHook { KHook::IKHook* __exported__khook = nullptr; } \
PL_EXPOSURE_FUNC(name, var)
@ -506,7 +506,7 @@ class IKHook;
* to use values like g_SHPtr in other files.
*/
#define PLUGIN_GLOBALVARS() \
extern KHook::IKHook* __exported__khook; \
namespace KHooK { extern KHook::IKHook* __exported__khook; } \
extern ISmmAPI *g_SMAPI; \
extern ISmmPlugin *g_PLAPI; \
extern PluginId g_PLID;
@ -516,7 +516,7 @@ class IKHook;
*/
#define PLUGIN_SAVEVARS() \
g_SMAPI = ismm; \
__exported__khook = static_cast<KHook::IKHook*>(ismm->MetaFactory(MMIFACE_KHOOK, nullptr, nullptr)); \
KHook::__exported__khook = static_cast<KHook::IKHook*>(ismm->MetaFactory(MMIFACE_KHOOK, nullptr, nullptr)); \
g_PLAPI = static_cast<ISmmPlugin *>(this); \
g_PLID = id;

2
third_party/khook vendored

@ -1 +1 @@
Subproject commit b95ce7df00cf3bbcbaf4d65a60c1d55d2a3b9c8f
Subproject commit dc059964c1ec674c18ee23c90b29800184fb07a8