Updates nativeactivity.cpp.

This commit is contained in:
James Chen 2013-12-31 10:55:59 +08:00
parent cf006df9ff
commit 973adc6b2f
1 changed files with 1 additions and 1 deletions

View File

@ -561,7 +561,7 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd) {
{
cocos2d::Application::getInstance()->applicationDidEnterBackground();
cocos2d::EventCustom backgroundEvent(EVENT_COME_TO_BACKGROUND);
cocos2d::EventDispatcher::getInstance()->dispatchEvent(&backgroundEvent);
cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&backgroundEvent);
// Also stop animating.
engine->animating = 0;
engine_draw_frame(engine);