Skip to content

Commit b38fe37

Browse files
committed
Fix erroneous definition for khook global var
1 parent 0e3b70e commit b38fe37

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/ISmmPlugin.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ class IKHook;
494494
ISmmAPI *g_SMAPI = NULL; \
495495
ISmmPlugin *g_PLAPI = NULL; \
496496
PluginId g_PLID = (PluginId)0; \
497-
KHook::IKHook* __exported__khook = nullptr; \
497+
namespace KHook { KHook::IKHook* __exported__khook = nullptr; } \
498498
PL_EXPOSURE_FUNC(name, var)
499499

500500

@@ -506,7 +506,7 @@ class IKHook;
506506
* to use values like g_SHPtr in other files.
507507
*/
508508
#define PLUGIN_GLOBALVARS() \
509-
extern KHook::IKHook* __exported__khook; \
509+
namespace KHooK { extern KHook::IKHook* __exported__khook; } \
510510
extern ISmmAPI *g_SMAPI; \
511511
extern ISmmPlugin *g_PLAPI; \
512512
extern PluginId g_PLID;
@@ -516,7 +516,7 @@ class IKHook;
516516
*/
517517
#define PLUGIN_SAVEVARS() \
518518
g_SMAPI = ismm; \
519-
__exported__khook = static_cast<KHook::IKHook*>(ismm->MetaFactory(MMIFACE_KHOOK, nullptr, nullptr)); \
519+
KHook::__exported__khook = static_cast<KHook::IKHook*>(ismm->MetaFactory(MMIFACE_KHOOK, nullptr, nullptr)); \
520520
g_PLAPI = static_cast<ISmmPlugin *>(this); \
521521
g_PLID = id;
522522

third_party/khook

0 commit comments

Comments
 (0)