Hi Philip, Thanks. I'll keep that in mind.I'm definitely looking for a more effective way to handle this as I've never quite got the hang of DirectInput's keyboard handling. I've found SDL much more easy to do what I want to do as its much more self-explanitory and simple.
On 4/29/11, Philip Bennefall <[email protected]> wrote: > Hi Thomas, > > I am not part of the USA Games mailing list so didn't see that message, I > only saw this request for suggestions and figured I'd throw my own in with > the rest. Smile. > > Of course I don't know how your code is structured so my comments may be > completely off, but it is actually very simple to put a key pressed function > into place on top of key down. You just have a separate array with all keys, > where each array entry corresponds to a state of the key. In my > implementation 0 means not down before, 1 means just pushed down and 2 means > already down. So when key_pressed is called in BGT, for instance, it simply > calls key_down and updates the state in the second array accordingly. Again, > of course I have no clue how your code is structure so if this suggestion > still would require major rewriting, just ignore it and change the keyboard > layout based on what you feel is best and what other people on the list may > want. > > Kind regards, > > Philip Bennefall --- Gamers mailing list __ [email protected] If you want to leave the list, send E-mail to [email protected]. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/[email protected]. If you have any questions or concerns regarding the management of the list, please send E-mail to [email protected].
