mirror of https://github.com/axmolengine/axmol.git
Merge pull request #3528 from natural-law/ForPlugin
Modify the method cocos_android_app_init()
This commit is contained in:
commit
9dedb072e6
|
@ -35,7 +35,7 @@
|
|||
#define LOG_EVENTS_DEBUG(...)
|
||||
// #define LOG_EVENTS_DEBUG(...) ((void)__android_log_print(ANDROID_LOG_INFO, "cocos2dx/nativeactivity.cpp", __VA_ARGS__))
|
||||
|
||||
void cocos_android_app_init(void);
|
||||
void cocos_android_app_init(struct android_app* app);
|
||||
|
||||
/**
|
||||
* Our saved state data.
|
||||
|
@ -72,19 +72,19 @@ typedef struct cocos_dimensions {
|
|||
int h;
|
||||
} cocos_dimensions;
|
||||
|
||||
static void cocos_init(cocos_dimensions d, AAssetManager* assetmanager) {
|
||||
static void cocos_init(cocos_dimensions d, struct android_app* app) {
|
||||
LOGI("cocos_init(...)");
|
||||
pthread_t thisthread = pthread_self();
|
||||
LOGI("pthread_self() = %X", thisthread);
|
||||
|
||||
cocos2d::FileUtilsAndroid::setassetmanager(assetmanager);
|
||||
cocos2d::FileUtilsAndroid::setassetmanager(app->activity->assetManager);
|
||||
|
||||
if (!cocos2d::Director::getInstance()->getOpenGLView())
|
||||
{
|
||||
cocos2d::EGLView *view = cocos2d::EGLView::getInstance();
|
||||
view->setFrameSize(d.w, d.h);
|
||||
|
||||
cocos_android_app_init();
|
||||
cocos_android_app_init(app);
|
||||
|
||||
cocos2d::Application::getInstance()->run();
|
||||
}
|
||||
|
@ -431,7 +431,7 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd) {
|
|||
ccxhelperInit.methodID,
|
||||
app->activity->clazz);
|
||||
|
||||
cocos_init(d, app->activity->assetManager);
|
||||
cocos_init(d, app);
|
||||
}
|
||||
engine->animating = 1;
|
||||
engine_draw_frame(engine);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
void cocos_android_app_init (struct android_app* app) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
void cocos_android_app_init (struct android_app* app) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
void cocos_android_app_init (struct android_app* app) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
void cocos_android_app_init (struct android_app* app) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
void cocos_android_app_init (struct android_app* app) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
void cocos_android_app_init (struct android_app* app) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
void cocos_android_app_init (struct android_app* app) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
void cocos_android_app_init (struct android_app* app) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
void cocos_android_app_init (struct android_app* app) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
void cocos_android_app_init (struct android_app* app) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
void cocos_android_app_init (void) {
|
||||
void cocos_android_app_init (struct android_app* app) {
|
||||
LOGD("cocos_android_app_init");
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue