Pause when moving the window in Windows

Hi,
I’ve noticed that moving the window under Win32 produces a pause in my
game. The cause seems to be that when my app recieves the message that the
user is moving the screen, it is suspended until the user releases the
button. I’ve tried to get the message via SDL_SysWMEvent but i get it after
the fact so it’s not useful. I’ve been thinking of additional ways of
walking around the problem, but no good solution has come to me. The
DirectDraw version of my program uses a different thread to draw so is not
prone to this problem. Under SDL, threading is not allowed, but I would be
happy if I could just tell when the user moves the window and treat the
lapse as in-game pause time, that is, as if that time never passed for my
game.
The best soultion I have so far is comparing the time between frames to
some threshold and not advancing my game more than this constant each
frame.

Any ideas are appreciated,
Bruno Martinez---------------------------------------------
@internet URUGUAY: http://www.internet.com.uy
El mejor servicio de acceso a la red.

[…]

This is a bug (or feature…?) in the Win32 window manager. It’s been
pissing me off a few times, both with Delphi and C/C++ (gcc), and I
think it’s the same in all reasonably relevant Windows versions.

I haven’t really found any ways around it, short of (as you suggest)
using another thread, or bypassing the Win32 WM and rolling your own
or your window(s), WinAmp style.

If there is a better solution, I’m interested - and of course, I’d
like to see it in SDL as well.

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Tuesday 15 July 2003 04.04, Bruno Mart?nez wrote:

Hi,
I’ve noticed that moving the window under Win32 produces a pause in
my game. The cause seems to be that when my app recieves the
message that the user is moving the screen, it is suspended until
the user releases the button.