Merge pull request #5815 from dumganhar/develop

Reverts changes in CCApplication.cpp/.mm, pollEvent must after main loop, otherwise, potential crash will happen.
This commit is contained in:
James Chen 2014-03-15 00:14:10 +08:00
commit 7337f87cb7
3 changed files with 4 additions and 7 deletions

View File

@ -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)

View File

@ -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)
{

View File

@ -89,9 +89,8 @@ int Application::run()
{
nLast.QuadPart = nNow.QuadPart;
// Poll event before mainloop
glview->pollEvents();
director->mainLoop();
glview->pollEvents();
}
else
{