1
Window / Unresponsive mouse event
« on: March 28, 2010, 08:08:12 pm »
I have resolved the problem, at last. It was an error in my code!
In the event handling code I had:
I have replaced the if with a while:
Now the lag is disappeared, and everything works fine. Sorry to have bothered you!
Bye
In the event handling code I had:
Code: [Select]
void CGameEngine::handleEvent()
{
// let the state handle events
if(m_win.GetEvent(m_event))
m_currentState->handleEvent(m_event);
}
I have replaced the if with a while:
Code: [Select]
void CGameEngine::handleEvent()
{
// let the state handle events
while(m_win.GetEvent(m_event))
m_currentState->handleEvent(m_event);
}
Now the lag is disappeared, and everything works fine. Sorry to have bothered you!
Bye