Re: joystick GetDeviceData patch

Rob Crittenden <[email protected]>
Newsgroups gmane.comp.emulators.winex.devel
Message-ID <[email protected]>
On Mon, 29 Mar 2004, Ove Kaaven wrote:
> fre, 26.03.2004 kl. 04.44 skrev Rob Crittenden:
> > This is an implemention of GetDeviceData() for joysticks. It is based
> > heavily on the existing mouse and keyboard implementations. From my testing
> > using simple test programs as well as with BF1942 it works and doesn't
> > break mice. This makes a minor change to the mouse code by adding an
> > overflow state that isn't actually used, but since the mouse and joystick
> > share code it had to be.
> 
> Does BF1942 need this overflow feature? If it's needed, can't you also
> just add this feature to the mouse code as well, so it isn't an unused
> state there?

Well, IIRC BF1942 defines an array of 20 elements. This is fairly large.
I had to set the # of elements to 2 during testing to test the overflow.
This is a long way to say that no, it probably doesn't use overflow. I have
no way to know whether it tests for it or not though. I added this merely
for completeness to the spec. I can see about adding it to the mouse code
too. I was initially reluctant to do so in the "if it ain't broke, don't
fix it" line of reasoning.

I'll look at the mouse code and see what would be involved in adding the
overflow state, it probably isn't much. If it turns out I can do it easily
and doesn't seem to cause any problems I'll submit another patch that is
all-inclusive. Otherwise I'll strip the overflow stuff from the joystick
patch and resubmit.

rob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.