mirror of https://github.com/axmolengine/axmol.git
Merge pull request #6958 from Dhilan007/v3
fixed EVENT_COME_TO_BACKGROUND has not been sent on android.
This commit is contained in:
commit
e33871db9a
|
@ -1,6 +1,7 @@
|
|||
#include "base/CCIMEDispatcher.h"
|
||||
#include "base/CCDirector.h"
|
||||
#include "base/CCEventType.h"
|
||||
#include "base/CCEventCustom.h"
|
||||
#include "../CCApplication.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
#include "JniHelper.h"
|
||||
|
@ -16,6 +17,8 @@ extern "C" {
|
|||
|
||||
JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnPause() {
|
||||
Application::getInstance()->applicationDidEnterBackground();
|
||||
cocos2d::EventCustom backgroundEvent(EVENT_COME_TO_BACKGROUND);
|
||||
cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&backgroundEvent);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnResume() {
|
||||
|
|
Loading…
Reference in New Issue