diff --git a/cocos/2d/platform/linux/CCApplication.cpp b/cocos/2d/platform/linux/CCApplication.cpp index 3fb269fef1..9ea95ec06f 100644 --- a/cocos/2d/platform/linux/CCApplication.cpp +++ b/cocos/2d/platform/linux/CCApplication.cpp @@ -83,9 +83,8 @@ int Application::run() { lastTime = getCurrentMillSecond(); - // Poll event before mainloop - glview->pollEvents(); director->mainLoop(); + glview->pollEvents(); curTime = getCurrentMillSecond(); if (curTime - lastTime < _animationInterval) diff --git a/cocos/2d/platform/mac/CCApplication.mm b/cocos/2d/platform/mac/CCApplication.mm index 817b5d2806..43dd21583a 100644 --- a/cocos/2d/platform/mac/CCApplication.mm +++ b/cocos/2d/platform/mac/CCApplication.mm @@ -82,10 +82,9 @@ int Application::run() { lastTime = getCurrentMillSecond(); - // Poll event before mainloop - glview->pollEvents(); director->mainLoop(); - + glview->pollEvents(); + curTime = getCurrentMillSecond(); if (curTime - lastTime < _animationInterval) { diff --git a/cocos/2d/platform/win32/CCApplication.cpp b/cocos/2d/platform/win32/CCApplication.cpp index 84d0dc308e..05dd5ee4ac 100644 --- a/cocos/2d/platform/win32/CCApplication.cpp +++ b/cocos/2d/platform/win32/CCApplication.cpp @@ -89,9 +89,8 @@ int Application::run() { nLast.QuadPart = nNow.QuadPart; - // Poll event before mainloop - glview->pollEvents(); director->mainLoop(); + glview->pollEvents(); } else {