fix: init config on all platform & stop runtime when exit

This commit is contained in:
yinjimmy 2014-12-30 15:59:52 +08:00
parent 538be7d973
commit 4c57a29455
1 changed files with 9 additions and 4 deletions

View File

@ -21,16 +21,21 @@ using namespace std;
AppDelegate::AppDelegate()
{
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32) && (CC_TARGET_PLATFORM != CC_PLATFORM_MAC)
auto config = ConfigParser::getInstance();
_project.setScriptFile(config->getEntryFile());
#endif
}
AppDelegate::~AppDelegate()
{
SimpleAudioEngine::end();
#if (COCOS2D_DEBUG > 0 && CC_CODE_IDE_DEBUG_SUPPORT > 0)
// NOTE:Please don't remove this call if you want to debug with Cocos Code IDE
endRuntime();
#endif
if (_project.getDebuggerType() != kCCRuntimeDebuggerNone)
{
// NOTE:Please don't remove this call if you want to debug with Cocos Code IDE
endRuntime();
}
ConfigParser::purge();
}