[SDL] proposed changes to the event system

Sam Lantinga slouken at devolution.com
Wed Jan 14 07:11:15 PST 2009


> For Cocoa, that allows up to make the following implementations:

> void Cocoa_GetEvent(_THIS, , SDL_Event *event, int timeout)
> {
>     return SDL_GenericGetEvent(_this, event, timeout, Cocoa_PumpEvents);
> }

Wouldn't you want to take advantage of the callback nature of the SDL 1.3
cocoa implementation?

>     At this point, we should either have had an event, timed out or
> had some kind of error.

XPending() will also return if here is some wire protocol pending.

> Of course, I expect a million little bugs to come out of the wazoo
> with this, with things like SDL_GetKeyState, for example, but it'll be
> worth it, I think. :-)

One thing that comes to mind is that generating the events should come
from the appropriate function in src/event, so that SDL's internal state
is updated correctly.

Anyway, I'm interested in seeing how this plays out.

See ya,
	-Sam Lantinga, Founder and President, Galaxy Gameworks LLC



More information about the SDL mailing list