[SDL] Regarding event programming

Sam Lantinga slouken at devolution.com
Sun Sep 29 17:40:01 PDT 2002


> Hi,

> well this is my first attempt at SDL event programming and I have
> a small problem, which got me stumped for the last hour. A quick
> search with google returned nothing useful (except for standard
> documentation). Maybe it's to late... :o)

> I have an application which does something like that
>  
> Init
> loop
>    calculate data
>    Refresh display (including own cursor)
>    Get SDL_Event
>    Process Event (change data for next calculation)
> loop end

How about this:

Init
loop
   calculate data
   Refresh display (including own cursor)
   while SDL_Event
       Process Event (change data for next calculation)
   while end
loop end

See ya,
	-Sam Lantinga, Software Engineer, Blizzard Entertainment




More information about the SDL mailing list