galakt / slimdx

Automatically exported from code.google.com/p/slimdx
0 stars 0 forks source link

support for the DirectInput.Device.CreateEffect #406

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Please add support for the DirectInput vibration/force effects. The DirectX
SDK comes with an example called ffconst. I'd like to be able to reproduce
this example exactly. This involves wrapping the CreateInput function, the
DIEFFECT structure (by method to create the struct or by a struct
directly), and the DIRECTINPUTEFFECT object.

Original issue reported on code.google.com by countpri...@gmail.com on 17 Jan 2009 at 4:23

GoogleCodeExporter commented 8 years ago
Accepting.

Original comment by Mike.Popoloski on 18 Jan 2009 at 7:08

GoogleCodeExporter commented 8 years ago
I need this today so I'm going to code it. I'll post the code here when I'm 
done.

Original comment by countpri...@gmail.com on 30 Jan 2009 at 6:20

GoogleCodeExporter commented 8 years ago
Oh, sorry about that. If you had let us know you were on time constraints I 
would
have been sure to focus on this earlier.

Original comment by Mike.Popoloski on 31 Jan 2009 at 5:33

GoogleCodeExporter commented 8 years ago
Well, I coded up a first pass at it. I confess I'm no managed C++ expert. I did
manage to get everything needed for the ffconst example. The attached zip has 
all the
files I used including the program.cs file that mimics the ffconst 
functionality.

Things not done:
1. The DICONDITION and DICUSTOMFORCE don't have wrappers yet. I couldn't figure 
out
how to do them nicely. With the other three I just use the 
Marshal.StructureToPtr.
But that won't work for these two (see the documentation).
2. I don't have any way to view the TypeSpecificParameters structures or data 
after
it has been set. I wasn't sure we wanted to expose those structures.
3. I didn't code the EnumEffects method. It seems that you guys write your own
collection wrappers for everything and you wrap the enumerators up as getters 
that
return the full list. Anyway, I don't think it would take someone with callback
experience long to code this.

I'm doing some manual copies that probably could be done with marshaling. I 
don't
know what your standards on that are. I also wasn't sure what to do on signed 
vs.
unsigned ints. I think the attached files could be reviewed and incorporated 
into
your standards in short time, though. Some of the files in the zip are new and 
some
are the same as the files already in the DirectInput folder. If you drop the zip
files into that folder you should be able to run a diff for a good summary of 
the
additions. I'd like the ffconst2 sample to be included in the official samples 
for
testing force feedback devices.

Original comment by countpri...@gmail.com on 5 Feb 2009 at 8:59

Attachments:

GoogleCodeExporter commented 8 years ago
Starting work on this finally. Thanks for the work you've done.

Original comment by Mike.Popoloski on 5 Mar 2009 at 5:20

GoogleCodeExporter commented 8 years ago
Will finish by March release.

Original comment by Mike.Popoloski on 13 Mar 2009 at 4:50

GoogleCodeExporter commented 8 years ago
I'm going to push this past the March release. In the process of implementing 
effects
I've started refactoring large portions of the DI subsystem. It would be wrong 
to try
to rush this in before March.

Original comment by Mike.Popoloski on 18 Mar 2009 at 2:08

GoogleCodeExporter commented 8 years ago
I am also very interested in this feature, as a game I am working on porting 
from MDX
had Force Feedback already working, and now I can't use it any more.  FF was
traditionally an uninteresting feature of DI since so few gamepads had it, but 
now a
lot of the commonly-sold gamepads do, since this is a common feature of console 
game
pads.

Any (rough) idea when a version of SlimDX that supports this will be available?

Original comment by chrispa...@gmail.com on 21 May 2009 at 7:21

GoogleCodeExporter commented 8 years ago
Should be done for the June release.

Original comment by Mike.Popoloski on 22 May 2009 at 3:50

GoogleCodeExporter commented 8 years ago
Excellent, thanks!

Original comment by chrispa...@gmail.com on 22 May 2009 at 3:53

GoogleCodeExporter commented 8 years ago
I got most of the major stuff done. If I'm still missing something you need, 
open
another issue.

Original comment by Mike.Popoloski on 23 May 2009 at 9:12