Usage in cooperative app

Is there any examples of how to use SDL in a cooperative environment (e.g.
one where it doesn’t use 100% CPU)? I need to do a map editor of sorts and
i’d like to use SDL for the blitting portion, but since its going to be a
Windowed Win32 application, it needs to get along with other apps and not
hog the CPU. It seems to be possible since the MpegTV thing should have to
run with other apps at the same time, but they don’t publish the code for me
to go and look for myself.

Any ideas?

Michael Rich
http://alphax86dev.cjb.net

Is there any examples of how to use SDL in a cooperative environment (e.g.
one where it doesn’t use 100% CPU)? I need to do a map editor of sorts and
i’d like to use SDL for the blitting portion, but since its going to be a
Windowed Win32 application, it needs to get along with other apps and not
hog the CPU. It seems to be possible since the MpegTV thing should have to
run with other apps at the same time, but they don’t publish the code for me
to go and look for myself.

Any ideas?

Use SDL_WaitEvent() alot.
It does poll the event queue, but sleeps quite a bit as well.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec