Archived

This topic is now archived and is closed to further replies.

what are the advantages of using DirectInput8 over Windows funcitons

This topic is 4946 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Other than support for game pads and such, is there an advantage to using direct input over stuff like GetAsyncKeyState() and GetCursorPos? (namely in terms of speed)

Share this post


Link to post
Share on other sites
You get more up-to-the-picosecond information (DirectInput working directly with the hardware, rather than through abstraction layers), plus you get things like buffered input that you don''t get with GetAsyncKeyState().

So yes, better speed.

Share this post


Link to post
Share on other sites
DI lets you, in effect, setup an interrupt handler for input devices (via event notification). It is almost as close to the metal as you can get in a protected-mode system, such as Win32.

-Nik

Share this post


Link to post
Share on other sites
What versions of the .lib and .h files should i be using? i get these errors:

INPUT.OBJ : error LNK2001: unresolved external symbol _GUID_SysMouse
INPUT.OBJ : error LNK2001: unresolved external symbol _GUID_SysKeyboard
INPUT.OBJ : error LNK2001: unresolved external symbol _IID_IDirectInput8A
dinput8.lib(dilib5.obj) : error LNK2001: unresolved external symbol _GUID_ZAxis
dinput8.lib(dilib5.obj) : error LNK2001: unresolved external symbol _GUID_YAxis
dinput8.lib(dilib5.obj) : error LNK2001: unresolved external symbol _GUID_XAxis
dinput8.lib(dilib2.obj) : error LNK2001: unresolved external symbol _GUID_Key
Debug/Unreal 2D.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.


using dinput.h and dinput8.lib

Share this post


Link to post
Share on other sites
holy hell, fast responces! thanks.

ok i guess they just seemed fast,i hadnt checked the times. (i just experienced a time lapse or something)

[edited by - unliterate on May 30, 2004 7:30:04 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Unliterate
ok i guess they just seemed fast,i hadnt checked the times. (i just experienced a time lapse or something)



yeah, only 8 minutes, this board is slipping loads in its response time

[edit - don't post whilst drunk!]

[edited by - s1ca on May 30, 2004 7:40:34 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Unliterate
Im not sure if that was sarcasm , but I was being serious, at first it seemed to me like less than a minute.


Sorry, I''m British - sarcasm is an unavoidable part of our genetic makeup ;o)

Share this post


Link to post
Share on other sites
quote:

Sorry, I''m British - sarcasm is an unavoidable part of our genetic makeup ;o)



Yeah, sure it is...

Red Sodium
Build a man a fire, and he''ll be warm for a day. Set a man on fire, and he''ll be warm for the rest of his life. - Terry Pratchett

Share this post


Link to post
Share on other sites