performance improvement for lua runtime on Run mode

This commit is contained in:
honghui 2014-09-25 12:01:16 +08:00
parent 8079722aff
commit 206e158596
1 changed files with 3 additions and 3 deletions

View File

@ -92,6 +92,8 @@ void startScript(string strDebugArg)
auto engine = LuaEngine::getInstance();
if (!strDebugArg.empty())
{
// open debugger.lua module
luaopen_debugger(engine->getLuaStack()->getLuaState());
engine->executeString(strDebugArg.c_str());
}
cocos2d::log("debug args = %s", strDebugArg.c_str());
@ -1213,9 +1215,7 @@ void initRuntime()
auto engine = LuaEngine::getInstance();
ScriptEngineManager::getInstance()->setScriptEngine(engine);
LuaStack* stack = engine->getLuaStack();
register_runtime_override_function(stack->getLuaState());
luaopen_debugger(engine->getLuaStack()->getLuaState());
register_runtime_override_function(engine->getLuaStack()->getLuaState());
static ConsoleCustomCommand *g_customCommand;
g_customCommand = new ConsoleCustomCommand();