diff --git a/cocos/scripting/lua-bindings/manual/lua_cocos2dx_manual.cpp b/cocos/scripting/lua-bindings/manual/lua_cocos2dx_manual.cpp index 1b2e2ff86a..b66fab6fb5 100644 --- a/cocos/scripting/lua-bindings/manual/lua_cocos2dx_manual.cpp +++ b/cocos/scripting/lua-bindings/manual/lua_cocos2dx_manual.cpp @@ -1234,7 +1234,7 @@ static int lua_cocos2dx_Layer_setAccelerometerInterval(lua_State* L) goto tolua_lerror; #endif double interval = tolua_tonumber(L, 2, 0); - Device::setAccelerometerEnabled(interval); + Device::setAccelerometerInterval(interval); return 0; }