mirror of https://github.com/axmolengine/axmol.git
Merge pull request #2868 from folecr/develop
fixed #2281: When user has built with JS Debugger support ScriptingCore will handle necessary runtime changes
This commit is contained in:
commit
1f2f366ef6
|
@ -42,7 +42,6 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
CCScriptEngineProtocol *pEngine = ScriptingCore::getInstance();
|
||||
CCScriptEngineManager::sharedManager()->setScriptEngine(pEngine);
|
||||
#if JSB_ENABLE_DEBUGGER
|
||||
ScriptingCore::getInstance()->enableDebugger();
|
||||
ScriptingCore::getInstance()->runScript("main.debug.js");
|
||||
#else
|
||||
ScriptingCore::getInstance()->runScript("MoonWarriors-jsb.js");
|
||||
|
|
|
@ -56,9 +56,6 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
#ifdef JS_OBFUSCATED
|
||||
ScriptingCore::getInstance()->runScript("game.js");
|
||||
#else
|
||||
#if JSB_ENABLE_DEBUGGER
|
||||
ScriptingCore::getInstance()->enableDebugger();
|
||||
#endif // JSB_ENABLE_DEBUGGER
|
||||
ScriptingCore::getInstance()->runScript("tests-boot-jsb.js");
|
||||
#endif
|
||||
return true;
|
||||
|
|
|
@ -380,6 +380,9 @@ JSBool ScriptingCore::evalString(const char *string, jsval *outVal, const char *
|
|||
void ScriptingCore::start() {
|
||||
// for now just this
|
||||
this->createGlobalContext();
|
||||
#if JSB_ENABLE_DEBUGGER
|
||||
this->enableDebugger();
|
||||
#endif //JSB_ENABLE_DEBUGGER
|
||||
}
|
||||
|
||||
void ScriptingCore::addRegisterCallback(sc_register_sth callback) {
|
||||
|
|
Loading…
Reference in New Issue