That's the easiest solution?
Dude you really need to give DInput a shot sometime :)
> -----Original Message-----
> From: Pierre Terdiman [mailto:p.t...@wa...]
> Sent: 05 June 2003 14:25
> To: gam...@li...
> Subject: Re: [GD-Windows] Input thread
>
>
> 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
>
|