Sign in to follow this  


Recommended Posts

How do I use this function? I'm guessing that it is used to ignore some events while posting other into the queue but I'm confused as to how to implement this. For example:
int MyEventFilter( const SDL_Event *event )
     if ( event.type == SDL_MOUSEBUTTONDOWN )
     { return 1; // post to queue }

     return 0; // do not post

int main()
   SDL_SetEventFilter( MyEventFilter );

   for ( ;; )
        // what do I do here?

        // SDL doc says not to mess with SDL_QUIT. How do I deal with that?

return 0;

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this