File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ inline bool keyDown(PlatformKey key, NSEvent* event)
4343 auto viewFrame = [[[event window ] contentView ] frame ];
4444 auto winSize = cocos2d::CCDirector::get ()->getWinSize ();
4545 auto scaleFactor = cocos2d::CCPoint (winSize) / ccp (viewFrame.size .width , viewFrame.size .height );
46- auto mouse = [event locationInView ];
46+ auto mouse = [event locationInWindow ];
4747
4848 return ccp (mouse.x - windowFrame.origin .x , winSize.height - (mouse.y - windowFrame.origin .y )) * scaleFactor;
4949 }
@@ -52,7 +52,7 @@ inline bool keyDown(PlatformKey key, NSEvent* event)
5252
5353#define HOOK_OBJC_METHOD (klass, type, cleanFuncName, funcName ) \
5454 do { \
55- auto cleanFuncName ## Method = class_getInstanceMethod (objc_getClass (klass), @selector (funcName )); \
55+ auto cleanFuncName ## Method = class_getInstanceMethod (objc_getClass (# klass), @selector (funcName )); \
5656 cleanFuncName ## OIMP = reinterpret_cast <type>(method_getImplementation (cleanFuncName ## Method )); \
5757 method_setImplementation (cleanFuncName ## Method , reinterpret_cast <IMP >(&cleanFuncName)); \
5858 geode::log::debug (" Hooked Objective C Method '" #klass " " #funcName " '" ); \
You can’t perform that action at this time.
0 commit comments