2014-03-10 19:33:57 +08:00
|
|
|
#include "AppDelegate.h"
|
|
|
|
#include "cocos2d.h"
|
2014-05-17 05:36:00 +08:00
|
|
|
#include "platform/android/jni/JniHelper.h"
|
2014-03-10 19:33:57 +08:00
|
|
|
#include <jni.h>
|
|
|
|
#include <android/log.h>
|
2015-01-14 14:44:48 +08:00
|
|
|
#include "ide-support/SimpleConfigParser.h"
|
2015-04-21 01:25:44 +08:00
|
|
|
#include "ide-support/CodeIDESupport.h"
|
2014-03-10 19:33:57 +08:00
|
|
|
|
|
|
|
#define LOG_TAG "main"
|
|
|
|
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
|
|
|
|
|
|
|
|
using namespace cocos2d;
|
|
|
|
|
2014-03-25 15:43:42 +08:00
|
|
|
void cocos_android_app_init (JNIEnv* env, jobject thiz) {
|
2014-03-10 19:33:57 +08:00
|
|
|
LOGD("cocos_android_app_init");
|
|
|
|
AppDelegate *pAppDelegate = new AppDelegate();
|
|
|
|
}
|
2015-01-09 04:08:41 +08:00
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
2015-01-13 18:28:33 +08:00
|
|
|
bool Java_org_cocos2dx_lua_AppActivity_nativeIsLandScape(JNIEnv *env, jobject thisz)
|
|
|
|
{
|
|
|
|
return SimpleConfigParser::getInstance()->isLanscape();
|
|
|
|
}
|
|
|
|
|
2015-01-09 04:08:41 +08:00
|
|
|
bool Java_org_cocos2dx_lua_AppActivity_nativeIsDebug(JNIEnv *env, jobject thisz)
|
|
|
|
{
|
2015-04-21 01:25:44 +08:00
|
|
|
#if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0)
|
2015-04-02 18:27:53 +08:00
|
|
|
return true;
|
|
|
|
#else
|
|
|
|
return false;
|
|
|
|
#endif
|
2015-01-09 04:08:41 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|