fixed android degbug

This commit is contained in:
cw 2014-05-20 11:44:46 +08:00
parent a2be97380b
commit 84d66219c8
2 changed files with 11 additions and 2 deletions

View File

@ -25,5 +25,14 @@ extern "C"
} }
return ConfigParser::getInstance()->isLanscape(); 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 //2.Set the format of window
// Check the wifi is opened when the android:debuggable is "true". // Check the wifi is opened when the native is debug.
if(0!=((this.getApplicationInfo().flags) & ApplicationInfo.FLAG_DEBUGGABLE)) if(nativeIsDebug())
{ {
if(!isWifiConnected()) if(!isWifiConnected())
{ {