mirror of https://github.com/axmolengine/axmol.git
BUGFIX:SOMETIMES APP DIRECTLY AT THE STARTUP
Sometimes app directly at the startup on android platform.
This commit is contained in:
parent
d2c36d604f
commit
97c076337a
|
@ -17,9 +17,11 @@ extern "C" {
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnPause() {
|
JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnPause() {
|
||||||
Application::getInstance()->applicationDidEnterBackground();
|
if (Director::getInstance()->getOpenGLView()) {
|
||||||
cocos2d::EventCustom backgroundEvent(EVENT_COME_TO_BACKGROUND);
|
Application::getInstance()->applicationDidEnterBackground();
|
||||||
cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&backgroundEvent);
|
cocos2d::EventCustom backgroundEvent(EVENT_COME_TO_BACKGROUND);
|
||||||
|
cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&backgroundEvent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnResume() {
|
JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnResume() {
|
||||||
|
|
Loading…
Reference in New Issue