Jump to content
  • Advertisement
Sign in to follow this  


This topic is 3714 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!