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
Post a Comment