Merge pull request #23 from chuanweizhang2013/v3luaruntime

fixed android degbug
This commit is contained in:
cocoscodeide 2014-05-20 11:59:26 +08:00
commit d505cb3b50
2 changed files with 11 additions and 2 deletions

View File

@ -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
}
}

View File

@ -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())
{