From 859242c29b2bf08693281ca88e990586128b4f9a Mon Sep 17 00:00:00 2001 From: cw Date: Sat, 17 May 2014 22:24:56 +0800 Subject: [PATCH 1/4] fixed portrait --- .../frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm | 2 +- .../frameworks/runtime-src/proj.win32/SimulatorWindow.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm index f682d4bd0d..e3da120bb2 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm @@ -128,7 +128,7 @@ void createSimulator(const char* viewName, float width, float height,bool isLand { float tmpvalue =width; width = height; - height = width; + height = tmpvalue; } [g_nsAppDelegate createSimulator:[NSString stringWithUTF8String:viewName] viewWidth:width viewHeight:height factor:frameZoomFactor]; diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/SimulatorWindow.cpp b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/SimulatorWindow.cpp index 647b5432d9..8abd405c48 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/SimulatorWindow.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/SimulatorWindow.cpp @@ -312,7 +312,7 @@ void createSimulator(const char* viewName, float width, float height, bool isLan { float tmpvalue =width; width = height; - height = width; + height = tmpvalue; } g_eglView = GLView::createWithRect(viewName,Rect(0,0,width,height),frameZoomFactor); From defd10da72178bb1f3373b612acec0ebba4a4afb Mon Sep 17 00:00:00 2001 From: cw Date: Sat, 17 May 2014 22:46:09 +0800 Subject: [PATCH 2/4] modiy size --- templates/lua-template-runtime/runtime/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lua-template-runtime/runtime/config.json b/templates/lua-template-runtime/runtime/config.json index a137c0513b..59412228bf 100644 --- a/templates/lua-template-runtime/runtime/config.json +++ b/templates/lua-template-runtime/runtime/config.json @@ -1,6 +1,6 @@ { "version":"v3-lua-runtime-1.1.1", - "zip_file_size":"20853321", + "zip_file_size":"20854899", "repo_name":"cocos-runtime-bin", "repo_parent":"https://github.com/chukong/" } From 84d66219c8b82bb77124151d38212226ec9d2a13 Mon Sep 17 00:00:00 2001 From: cw Date: Tue, 20 May 2014 11:44:46 +0800 Subject: [PATCH 3/4] fixed android degbug --- .../frameworks/runtime-src/proj.android/jni/lua/main.cpp | 9 +++++++++ .../proj.android/src/org/cocos2dx/lua/AppActivity.java | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/lua/main.cpp b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/lua/main.cpp index 3aae632663..87ff60db09 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/lua/main.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/lua/main.cpp @@ -25,5 +25,14 @@ extern "C" } return ConfigParser::getInstance()->isLanscape(); } + + bool Java_org_cocos2dx_lua_AppActivity_nativeIsDebug(JNIEnv *env, jobject thisz) + { + #ifdef NDEBUG + return false; + #else + return true; + #endif + } } diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/src/org/cocos2dx/lua/AppActivity.java b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/src/org/cocos2dx/lua/AppActivity.java index d03b838a65..8386cd32ea 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/src/org/cocos2dx/lua/AppActivity.java +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/src/org/cocos2dx/lua/AppActivity.java @@ -69,8 +69,8 @@ public class AppActivity extends Cocos2dxActivity{ //2.Set the format of window - // Check the wifi is opened when the android:debuggable is "true". - if(0!=((this.getApplicationInfo().flags) & ApplicationInfo.FLAG_DEBUGGABLE)) + // Check the wifi is opened when the native is debug. + if(nativeIsDebug()) { if(!isWifiConnected()) { From 1aa92bdef0871ea96c8c5996d9e023c7d17f513c Mon Sep 17 00:00:00 2001 From: cw Date: Tue, 20 May 2014 13:53:52 +0800 Subject: [PATCH 4/4] add java nativeIsDebug --- .../proj.android/src/org/cocos2dx/lua/AppActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/src/org/cocos2dx/lua/AppActivity.java b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/src/org/cocos2dx/lua/AppActivity.java index 8386cd32ea..d4dd55873a 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/src/org/cocos2dx/lua/AppActivity.java +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/src/org/cocos2dx/lua/AppActivity.java @@ -123,5 +123,6 @@ public class AppActivity extends Cocos2dxActivity{ } private static native boolean nativeIsLandScape(); + private static native boolean nativeIsDebug(); }