Re: [GD-Windows] Input thread
Brought to you by:
vexxed72
From: Pierre T. <p.t...@wa...> - 2003-06-05 21:32:46
|
Ok, I just rewrote it using vanilla Windows messages and it seems to work well indeed. I think I found my former bug : - The GetAsyncKeyState() version is testing mouse buttons as well. - To get back to Windows messages, I first record inputs in the event proc (keys, mouse messages like WM_LBUTTONDOWN, etc). - Then when the character / scene gets updated, I fire all recorded events at the state machine and let it do its job. When I did that, it mostly worked but some combos were a lot more difficult to make. Which is probably why I discarded Win events at first. But Win events had nothing wrong, I just forgot to -also- record double-click messages (WM_LBUTTONDBLCLK, etc) as if they were normal clicks. Which makes the difference when a particular combo requires rapid clicking... Anyway, short story : it seems to work with standard Win events so far, which is the easiest solution I could have wanted, so everything's fine. [Until next bug pops up] Thanks for the help. - Pierre |