DirectInput driver for windows device

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
axpnumtheory
Posts: 2
Joined: Thu Apr 22, 2010 6:35 am

DirectInput driver for windows device

Post by axpnumtheory »

Hey,

I've updated the CIrrDeviceWin32 class to use DirectInput8 instead of the more basic Win32 calls to access joystick data. It also allows access to a DirectInputDevice8 interface so force feedback can be added by client applications. Contact me for the source, or if one of the admins can give me svn commit access i'll commit the changes.

-John
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Re: DirectInput driver for windows device

Post by randomMesh »

axpnumtheory wrote:if one of the admins can give me svn commit access i'll commit the changes.
:lol:
The standard procedure is to post a patch to the tracker.
"Whoops..."
CuteAlien
Admin
Posts: 9940
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I think the CIrrDeviceWin32 device should not depend on DirectX.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Josie
Posts: 44
Joined: Sat Jul 25, 2009 4:08 am
Location: Griffin, Georgia, US
Contact:

Post by Josie »

CuteAlien wrote:I think the CIrrDeviceWin32 device should not depend on DirectX.
Agreed, but it would be nice to take advantage of directinput when available ( On every windows OS Irrlicht supports :lol: ).
axpnumtheory
Posts: 2
Joined: Thu Apr 22, 2010 6:35 am

Patch submitted

Post by axpnumtheory »

I have submitted the patch to the tracker. DirectInput is standard at this point on Windows and unfortunately there is nothing similar that is more compatible.
DtD
Posts: 264
Joined: Mon Aug 11, 2008 7:05 am
Location: Kansas
Contact:

Post by DtD »

Correct me if I'm wrong, but isn't DirectInput slowly getting phased out?
CuteAlien
Admin
Posts: 9940
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

It's basically as Josie said - it would be nice to use it. This is not about avoiding DirectInput, but only about doing this in the Win32 device class. Win32 is for using Windows-API functions and is therefore likely the wrong class to implement this.

And while DirectInput is rather standard, it is for example still harder to use with gcc on Windows. Basically you can only work with half-official builds of the DirectX libraries which are imho even breaking the EULA's of the DirectX installer which, last I checked, forces anyone distributing DirectX libs to show the users first a certain EULA. And stuff like that unfortunately does matter. So it would need defines which allow to disable compiling it and the alternative has to stay in.

And not sure about DirectInput getting phased out - I also read about that before. But I don't know if there _is_ any other library supporting force-feedback devices.

Also not sure if Irrlicht should start supporting force-feedback.

But anyway - thanks for the patch. Having that is useful even if it won't make it in this time.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, the code should be disabled by default, and only enabled with a config flag. But it would be only useful in one of two cases that I can think of: Having a proper integration for force feedback in the API (and probably also support on other platforms as well), or getting support for other platforms by this (e.g. for consoles or mobile devices which only support DirectInput).
Brainsaw
Posts: 1242
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I think the input system of Irrlicht is OK. If you need more you could integrate OIS (http://sourceforge.net/projects/wgois/), there is also a howto on the wiki that helps integrating it (http://irrlicht3d.org/wiki/index.php?n= ... thIrrlicht)
Image
Dustbin::Games on the web: https://www.dustbin-online.de/
Josie
Posts: 44
Joined: Sat Jul 25, 2009 4:08 am
Location: Griffin, Georgia, US
Contact:

Post by Josie »

Agreed with all points above. However, do note that according to wikipedia DirectInput is being phased out. Microsoft now suggests just using the standard messaging loop for joystick inputs. This is because MS is actively marketing their XInput library ( which only works with the 360's pad ). So, really, we'd be implementing technology that microsoft might decide to stop supporting soon. Also, it hasn't had an update since DX8. I'm not so sure- It'd be nice to have, because it works well, but it seems well on it's way into microsoft's dumpster.
Post Reply