1
General / SFML freezes when mouse moves (VS 2010)
« on: December 25, 2011, 02:09:46 pm »
Hi i had the same problem but I finally found the problem!!!
App.PollEvent causes sfml to read the mouse movement too much.
I guessed it by reading this:
http://www.gamedev.net/topic/575371-sfml---quick-mouse-movement-lags-input/
Usually we have App.PollEvent copied from the SFML default set up to close the window.
App.PollEvent causes sfml to read the mouse movement too much.
I guessed it by reading this:
http://www.gamedev.net/topic/575371-sfml---quick-mouse-movement-lags-input/
Usually we have App.PollEvent copied from the SFML default set up to close the window.
Code: [Select]
Event Event;
while (App.PollEvent(Event))
{
// Close window : exit
if (Event.Type == Event::Closed)
{
App.Close();
}
}
//QUIT
if(Keyboard::IsKeyPressed(Keyboard::Escape))
{
App.Close();
}