[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] BUG: pygame.event.set_blocked and set_allowed
- To: PyGame <pygame-users@xxxxxxxx>
- Subject: [pygame] BUG: pygame.event.set_blocked and set_allowed
- From: Alex Holkner <aholkner@xxxxxxxxxxxxxx>
- Date: Tue, 11 Jul 2006 00:23:51 +1000
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Mon, 10 Jul 2006 10:23:18 -0400
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
- User-agent: Mozilla Thunderbird 1.0.6 (X11/20050716)
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.