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
DirectInput driver for windows device
-
randomMesh
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Re: DirectInput driver for windows device
axpnumtheory wrote:if one of the admins can give me svn commit access i'll commit the changes.
The standard procedure is to post a patch to the tracker.
"Whoops..."
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
axpnumtheory
- Posts: 2
- Joined: Thu Apr 22, 2010 6:35 am
Patch submitted
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.
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.
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
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:
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).
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)
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.
