From: Andreas Bednarek <andris@se...> - 2006-04-11 22:29:19
I know there are more exciting changes to happen than an input reader (there
will probably always be more exciting work to do than trying something with
DirectInput :)) but I'd like to contribute some code to have a more complete
input capturing, for Win32 only however ;( If you are interested of course.
Currently the only significant addition would be the buffered mouse with
event triggering implemented. Already works. Although... I'm not quite sure,
but there's probably a bug or incomplete implementation with ManagedDX and
There was a problem with typecasting 'int BufferedData.Offset' value to the
supposed DirectInput.Mouse type, that's not possible to do just by
typecasting, a specialized conversion has to take place. There is a forum
thread telling what's going on there:
I'd like to ask for your opinion what would be the better solution
a) Convert 'int Offset' to DInput.Mouse using the mentioned magic numbers...
b) Create a new enum type to replace DInput.Mouse, which could convert from
'int Offset' by a typecast operation and use that type for further
conditionals & switching instead. That would be another file to add to the
source, but I believe the cleanest solution currently.
c) Let that damn input sleep and wait for a ManagedDX release that does
well. Maybe not a bad idea either ;)
d) other idea?
P.S. the in the thread mentioned approach to join buffered & immediate input
to be used simultaneously with a single InputReader instance will be
probably rolled-back as this can be achieved by instantiating two
InputReaders, each for one of those methods (which I missed before).