Re: [GD-Windows] Input thread
Brought to you by:
vexxed72
From: Gabor <ts...@co...> - 2003-06-05 19:35:21
|
Windows messages can be lost if your window lose the focus. You should handle the WM_ACTIVATE message: if your window lose the focus you should stop every activity in your program (so in your example send a stop event to the character) A program is losing focus for example if you are using Alt+Tab to switch between tasks. Hope this helps, Gabor > Honestly, I don't know. It's been a long time now, but one year ago (or > maybe two) I was using Windows messages in that part of the code, and IIRC I > ran into some problems of lost messages. Typically, the "key up" event > sometimes was never caught, so for example : > - on key down, I was sending a message to a state machine, that eventually > made the character walk > - key up event was missed > - the character kept walking forever |