mirror of https://github.com/axmolengine/axmol.git
performance improvement for lua runtime on Run mode
This commit is contained in:
parent
8079722aff
commit
206e158596
|
@ -92,6 +92,8 @@ void startScript(string strDebugArg)
|
||||||
auto engine = LuaEngine::getInstance();
|
auto engine = LuaEngine::getInstance();
|
||||||
if (!strDebugArg.empty())
|
if (!strDebugArg.empty())
|
||||||
{
|
{
|
||||||
|
// open debugger.lua module
|
||||||
|
luaopen_debugger(engine->getLuaStack()->getLuaState());
|
||||||
engine->executeString(strDebugArg.c_str());
|
engine->executeString(strDebugArg.c_str());
|
||||||
}
|
}
|
||||||
cocos2d::log("debug args = %s", strDebugArg.c_str());
|
cocos2d::log("debug args = %s", strDebugArg.c_str());
|
||||||
|
@ -1213,9 +1215,7 @@ void initRuntime()
|
||||||
|
|
||||||
auto engine = LuaEngine::getInstance();
|
auto engine = LuaEngine::getInstance();
|
||||||
ScriptEngineManager::getInstance()->setScriptEngine(engine);
|
ScriptEngineManager::getInstance()->setScriptEngine(engine);
|
||||||
LuaStack* stack = engine->getLuaStack();
|
register_runtime_override_function(engine->getLuaStack()->getLuaState());
|
||||||
register_runtime_override_function(stack->getLuaState());
|
|
||||||
luaopen_debugger(engine->getLuaStack()->getLuaState());
|
|
||||||
|
|
||||||
static ConsoleCustomCommand *g_customCommand;
|
static ConsoleCustomCommand *g_customCommand;
|
||||||
g_customCommand = new ConsoleCustomCommand();
|
g_customCommand = new ConsoleCustomCommand();
|
||||||
|
|
Loading…
Reference in New Issue