fix focus bug, change battle events

This commit is contained in:
Eduardo Bart
2012-03-29 19:46:44 -03:00
parent e0325c4c3b
commit 959d9a87b0
5 changed files with 24 additions and 29 deletions

View File

@@ -23,6 +23,7 @@
#include "eventdispatcher.h"
#include <framework/core/clock.h>
#include "timer.h"
EventDispatcher g_eventDispatcher;
@@ -53,10 +54,10 @@ void EventDispatcher::poll()
int count = 0;
while(m_pollEventsSize > 0) {
if(count > 50) {
static bool reported = false;
if(!reported) {
static Timer reportTimer;
if(reportTimer.running() && reportTimer.ticksElapsed() > 250) {
logError("ATTENTION the event list is not getting empty, this could be caused by some bad code");
reported = true;
reportTimer.restart();
}
break;
}