I have this simple app that displays a screen and handles the quit event:
while( SDL_PollEvent( &e ) != 0 )
{
//User requests quit
if( e.type == SDL_QUIT )
{
quit = true;
}
}
If I compile this with SDL1.2 it runs fine, the quit event is handled immediately. However if I compile it for SDL2, then it takes ~5 seconds to get that event. And not just quit, but other events also, like mouse.
With sdl2 it takes ~95% of the cpu, while with sdl1.2 it's ~30-40%. The cpu is dual core, 1.2 ghz (pandaboard).
I suspect something, but I'm not 100% sure: I'm running this on ubuntu 12.04 which natively supports only sdl1.2. So I had to compile sdl2 from source code, as it's not available in that ubuntu.
Could this be the reason? Or any other clues what might be wrong? Thanks!