Skip to content

Commit e4b37ff

Browse files
committed
issue cocos2d#3069:Modify layer lua register and add some compatible lua binding functions
1 parent 23d332f commit e4b37ff

File tree

4 files changed

+798
-18
lines changed

4 files changed

+798
-18
lines changed

cocos/scripting/javascript/bindings/cocos2d_specifics.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3313,7 +3313,7 @@ JSBool js_cocos2dx_CCLayer_setKeyboardEnabled(JSContext *cx, uint32_t argc, jsva
33133313

33143314
dispatcher->addEventListenerWithSceneGraphPriority(listener, cobj);
33153315

3316-
dict->setObject(keyboardListener, "keyboardListener");
3316+
dict->setObject(listener, "keyboardListener");
33173317
}
33183318

33193319
JS_SET_RVAL(cx, vp, JSVAL_VOID);
@@ -3383,7 +3383,7 @@ JSBool js_cocos2dx_CCLayer_setAccelerometerEnabled(JSContext *cx, uint32_t argc,
33833383

33843384
dispatcher->addEventListenerWithSceneGraphPriority(listener, cobj);
33853385

3386-
dict->setObject(accListener, "accListener");
3386+
dict->setObject(listener, "accListener");
33873387
}
33883388

33893389
JS_SET_RVAL(cx, vp, JSVAL_VOID);

0 commit comments

Comments
 (0)