SDL_Delay() function and PC Windows xp SP2

SDL_Delay() function and PC Windows xp SP2…

Hi,

Are there limits to how many milliseconds can be used in
SDL_Delay(milliseconds) ???

Seems like anything above 5000 milliseconds makes my SDL application
not respond anymore in PC Windows xp SP2.
(need to run task manager to force PC Windows to stop my SDL application)

Thanks in advance…

My SDL based PC Windows Tetris game project:
http://www.silentheroproductions.com/tetribattle3_100percentforpcwindows.htm

(http://www.silentheroproductions.com/tetribattle3_100percentforpcwindows.htm)
(TetriBattle 3 100%[TM])

Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
SLNTHERO at AOL.com
Silent Hero Productions ®
"Fun, little games for when you don’t have time to save the world.[TM]"
www.SilentHeroProductions.com (http://www.silentheroproductions.com/)

The real question should be why you need a 5 second delay for your
application? Although I do understand some programs will need more than
that, but there are other methods of achieving it while still being
responsive.

If you really need a 5 second delay or longer, try breaking it up in 500 ms
or 1 s chunks and perform event processing in between (so that it is still
responsive and yet still has the delay).

HTH,
RichardOn 4/20/06, SlntHero at aol.com wrote:

SDL_Delay() function and PC Windows xp SP2…

Hi,

Are there limits to how many milliseconds can be used in
SDL_Delay(milliseconds) ???

Seems like anything above 5000 milliseconds makes my SDL application
not respond anymore in PC Windows xp SP2.
(need to run task manager to force PC Windows to stop my SDL application)

Thanks in advance…

My SDL based PC Windows Tetris game project:

http://www.silentheroproductions.com/tetribattle3_100percentforpcwindows.htm
(TetriBattle 3 100%[TM])

Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
SLNTHERO at AOL.com
Silent Hero Productions ®
"Fun, little games for when you don’t have time to save the world.[TM]"
www.SilentHeroProductions.com http://www.silentheroproductions.com/


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Richard J Hancock
RJH Computers
http://www.rjhcomputers.com

Hello !

Are there limits to how many milliseconds can be used in
SDL_Delay(milliseconds) ???

Seems like anything above 5000 milliseconds makes my SDL application
not respond anymore in PC Windows xp SP2.
(need to run task manager to force PC Windows to stop my SDL application)

A better wait would be to doing this in
a loop that checks whether the 5 secs are over or not.
In the loop i would do SDL_Delay (10) and SDL_PumpEvents ()
to keep the event queue flowing.

CU

Yet another way would be to use a timer that causes a callback to be
called that pushes an SDL_USEREVENT.

Then use SDL_WaitEvent() to wait for that event, or any others you might
care about (keypress or mouse click to interrupt the 5sec delay… and,
of course, SDL_QUIT!)On Thu, Apr 20, 2006 at 03:36:13PM +0200, Torsten Giebl wrote:

A better wait would be to doing this in
a loop that checks whether the 5 secs are over or not.
In the loop i would do SDL_Delay (10) and SDL_PumpEvents ()
to keep the event queue flowing.


-bill!
bill at newbreedsoftware.com
http://www.newbreedsoftware.com/

SDL_Delay() function and PC Windows xp SP2…

Hi,

Are there limits to how many milliseconds can be used in
SDL_Delay(milliseconds) ???

Seems like anything above 5000 milliseconds makes my SDL application
not respond anymore in PC Windows xp SP2.
(need to run task manager to force PC Windows to stop my SDL
application)

Thanks in advance…

The SDL event queue has a fixed number of entries, ~128 last time I
looked. After that number of events have occurred it starts throwing
events in to that great bit bucket in the sky. The events are lost. So,
when you program wakes up, it responds to the events that are queued,
mostly lots of mouse movement. Then it appears to ignore everything else
because it has already tossed those events away.

The other people posting to answer the question have given you lots of
good suggestions. I think Kendrick’s is the best. Timers are designed
for timing things, SDL_Delay() is not.

	Bob PendletonOn Thu, 2006-04-20 at 08:34 -0400, SlntHero at aol.com wrote:

My SDL based PC Windows Tetris game project:
http://www.silentheroproductions.com/tetribattle3_100percentforpcwindows.htm
(TetriBattle 3 100%[TM])

Jesse “JeZ+Lee” Palser, BS, A+, Network+, MCP
SLNTHERO at AOL.com
Silent Hero Productions ®
"Fun, little games for when you don’t have time to save the
world.[TM]"
www.SilentHeroProductions.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

±-------------------------------------+