Jump to content

  • Log In with Google      Sign In   
  • Create Account

14 years ago on June 15th Gamedev.net was first launched! We want to thank all of you for being part of our community and hope the best years are ahead of us. Happy birthday Gamedev.net!

#Actualfastcall22

Posted 24 February 2012 - 11:15 PM

if(SDL_PollEvent(&event))

Should be:

while ( SDL_PollEvent( &event ) )

It's likely that your event queue accumulates more and and more windows events until your game slows down to a crawl -- you need to process all of the window messages between each frame, not just one per frame. (Not sure if this will fix your problem, but it will certainly help...)

#2fastcall22

Posted 24 February 2012 - 11:15 PM

if(SDL_PollEvent(&event))

Should be:

while ( SDL_PollEvent( &event ) )

It's likely that your event queue accumulates more and and more windows events until your game slows down to a crawl -- you need to process all of the window messages between each frame, not just one per frame.

#1fastcall22

Posted 24 February 2012 - 11:13 PM

if(SDL_PollEvent(&event))

Should be:

while ( SDL_PollEvent( &event ) )

PARTNERS