Skip to content

Commit

Permalink
cast hook
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaghettDev committed Dec 1, 2024
1 parent 13e65ec commit ad8868a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/macos.mm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ 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 = reinterpret_cast<type>(method_getImplementation(cleanFuncName ## Method)); \
method_setImplementation(cleanFuncName ## Method, (type)&cleanFuncName);
method_setImplementation(cleanFuncName ## Method, reinterpret_cast<IMP>(&cleanFuncName));

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

Expand Down

0 comments on commit ad8868a

Please sign in to comment.