Advertisement

DInput vs GetKeyState?

Started by April 10, 2003 05:00 PM
4 comments, last by Dtag 21 years, 10 months ago
Hi Can anyone explain the advantages of DInput against Get(Async)KeyState? For me, theres no visible difference between GetDeviceState and Get(Async)KeyState. Thanks alot
using direct input you are guarenteed the highest priority to the hardware... And the fastest access to it...
although minor, windows key/mouse functions can often be surprisingly slow.

| - Project-X - my mega project.. getting warmer - | - adDeath - an ad blocker I made - | - email me - |
Advertisement
I use SDL, as i make my software cross platform, and it''s input is great.. no complaints.

Smokey97
quote:
Original post by RipTorn
using direct input you are guarenteed the highest priority to the hardware... And the fastest access to it...
although minor, windows key/mouse functions can often be surprisingly slow.






A lot of people says direct input is faster that classic win32 key binding but when I made test in my projects, and don''t see ant difference between direct input and win32 ,

frame rate and key response seems to be exactly the same , even if you bind a lot of keys (about ten in my test , I dont make test with mouse , only with keyboard)




Using DI thuru an abject-oriented interface. I''d like to support feedback devices in the future and I don''t know if it is possible using other ways.
Sure, protability would be a bit ruined up but I simply have to redesign the object (which is a bit complex though) if I want to go for another OS.

BTW, take a look at DirectAudio. The interface is a mess and I cannot understand it but looks like it works much better than other cross-os APIs. I am saying this because I documented myself on some multi-os platform (especially openAL) and I **fear** they badly lose when compared to directX audio. This is way too bad.

Previously "Krohm"

here is an DirectInput 8.0 wrapper

feel free to use it
http://www.8ung.at/g0tt/bas/dinputwrapper.zip
http://www.8ung.at/basiror/theironcross.html

This topic is closed to new replies.

Advertisement