Skip to content

Commit

Permalink
cast original implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaghettDev committed Dec 1, 2024
1 parent 6e3dcb0 commit e050bb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/macos.mm
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ inline bool keyDown(PlatformKey key, NSEvent* event)

#define HOOK_OBJC_METHOD(klass, type, cleanFuncName, funcName) \
auto cleanFuncName ## Method = class_getInstanceMethod(klass, @selector(funcName)); \
cleanFuncName ## OIMP = method_getImplementation(cleanFuncName ## Method); \
cleanFuncName ## OIMP = reinterpret_cast<type>(method_getImplementation(cleanFuncName ## Method)); \
method_setImplementation(cleanFuncName ## Method, (type)&funcName);

using KeyEventType = void(*)(EAGLView*, SEL, NSEVent*);
using KeyEventType = void(*)(EAGLView*, SEL, NSEvent*);


static KeyEventType keyDownExecOIMP;
Expand Down

0 comments on commit e050bb7

Please sign in to comment.