diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp index 8b2af4aab4..6cac00e17c 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -26,15 +26,14 @@ bool AppDelegate::applicationDidFinishLaunching() initRuntime(); #endif - // initialize director - auto director = Director::getInstance(); - auto glview = director->getOpenGLView(); - if(!glview) { - - if (!ConfigParser::getInstance()->isInit()) { + if (!ConfigParser::getInstance()->isInit()) { ConfigParser::getInstance()->readConfig(); } + // initialize director + auto director = Director::getInstance(); + auto glview = director->getOpenGLView(); + if(!glview) { Size viewSize = ConfigParser::getInstance()->getInitViewSize(); string title = ConfigParser::getInstance()->getInitViewName(); #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json index 860fd0cf6c..323583608f 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json @@ -26,6 +26,13 @@ "from": "../../cocos2d-x/cocos/scripting/lua-bindings/script", "to": "" }, + { + "from": "../../../res", + "to": "res", + "include": [ + "config.json" + ] + }, { "from": "../../cocos2d-x/external/lua/luasocket", "to": "",