[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] BUG: pygame.event.set_blocked and set_allowed



Both functions behave incorrectly when passed None. For set_blocked, lines 823-824 of event.c read:

   else if(type == Py_None)
       SDL_EventState((Uint8)0, SDL_IGNORE);

should be:

   else if(type == Py_None)
       SDL_EventState((Uint8)0xff, SDL_IGNORE);

For set_allowed, lines 790-791 read:

   else if(type == Py_None)
       SDL_EventState((Uint8)0xFF, SDL_IGNORE);

should be:

   else if(type == Py_None)
       SDL_EventState((Uint8)0xFF, SDL_ENABLE);

Alex.