[SDL] Sdl 2.0.3 and Ubuntu 14.04

Ryan C. Gordon icculus at icculus.org
Thu Sep 11 13:08:35 PDT 2014


> video about what is happening:
> I write the FPS with red color, and it will become black. The
> application is still running, just without color.
> https://www.youtube.com/watch?v=2NdVptj-ZbY&list=UUEaVWVFsIpYqesdWZ4HYgBQ&index=1

Ubuntu turns windows to black and white when they aren't responding to 
window events for some time, to alert the user that the application 
appears to be hung up.

This will go away if you put this somewhere in your drawing loop:

    SDL_Event e;
    while (SDL_PollEvent(&e)) {}

Eventually you'd want to actually examine those events, but just polling 
for them and throwing them away will fix your problem for now.

--ryan.





More information about the SDL mailing list