c++ - SDL2 not recieving any events at all -


in sdl2 project, sdl_pollevents( sdl_event* e ) doesn't send events, , allways returns 0, can't process events. event processing loop looks fine :

sdl_event e;  while( sdl_pollevent( &e ) > 0 ) {     //this never reached !     printf( "recieved event %d\n", e.type );      switch(e.type)     {         case sdl_quit:             quit = true;     } } 

on other hand, compiles fine, drawing works, , i'm sure it's not stuck in infinite loop ( made print out message @ each frame ).

i link against sdl2 , other dependencies, make gcc/g++ call sdl-config --cflags. how can fixed ?

you shouldn't call sdl-config --cflags. sdl ( first version of library ), not sdl2. somehow conflicts , stops events reaching sdl_pollevents(). remove , should work !


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -