In an SDL2 project, SDL_PollEvents( SDL_Event* e ) doesn't send any events, and allways returns 0, so I can't process any events. My event processing loop looks fine :
SDL_Event e;
while( SDL_PollEvent( &e ) > 0 )
{
//this is never reached !
printf( "recieved event %d\n", e.type );
switch(e.type)
{
case SDL_QUIT:
quit = true;
}
}
On the other hand, it compiles fine, drawing works, and I'm sure it's not stuck in an infinite loop ( I made it print out a message at each frame ).
I link against SDL2 and all other dependencies, I even make gcc/g++ call sdl-config --cflags. How can this be fixed ?