dxwrapper icon indicating copy to clipboard operation
dxwrapper copied to clipboard

AvP2/LithTech Jittery Mouse fix?

Open StrikerMan780 opened this issue 5 years ago • 11 comments

Would it be possible to get some fix for dinput.dll to fix the jittery mouse in Aliens Vs. Predator 2, and other LithTech games like No One Lives Forever?

It seem to stem from USB mice with poll rates higher than 125hz, and many mice can't be set that low, making these games unplayable. I've tried DI-Wrapper, but it doesn't fix it, and makes things worse by not allowing you to shoot (clicks don't register).

StrikerMan780 avatar Aug 05 '18 01:08 StrikerMan780

I had a similar problem on Interstate '82. I used the dinput.dll file from below. Not sure if the same version will work on these games too. You can try it out.

dinput.zip

elishacloud avatar Aug 05 '18 02:08 elishacloud

@StrikerMan780, I created a DirectInput converter that converts DirectInput games to DirectInput8. I am not sure if this will help, but at least it will allow you to use dinput8.dll tools with these older games.

You can check it out here: dinputto8

elishacloud avatar Oct 06 '18 03:10 elishacloud

Is there some.. Possibility to document the differences between the (4 I think?) different versions dinput? And is there any "gain" (aside of compatibility with external tools in itself) from the upgrade?

mirh avatar Oct 06 '18 09:10 mirh

Yes, there are some minor differences between the different versions. However DirectInput8 has enough functions that I was able to map all versions to it. dinputto8 does a 1:1 mapping of all dinput functions to DirectInput8 functions.

As far as the versions of DirectInput, the dinput.h file says:

/*
 *  To build applications for older versions of DirectInput
 *
 *  #define DIRECTINPUT_VERSION [ 0x0300 | 0x0500 | 0x0700 ]
 *
 *  before #include <dinput.h>.  By default, #include <dinput.h>
 *  will produce a DirectX 8-compatible header file.
 *
 */

So it lists the same three versions that you mentioned. However, besides those versions there are also three interfaces:

  • IDirectInputA / IDirectInputW - This is the interface for v1
  • IDirectInput2A / IDirectInput2W - This is the interface for v2
  • IDirectInput7A / IDirectInput7W - This is the interface for v7

See here. So, in reality there are more than just those three versions. There are actually 7 versions (excluding version 8 of course).

Is there some.. Possibility to document the differences between the (4 I think?) different versions dinput?

All the differences are documented in the dinput.h file (that is the a link to the latest version).

  • v1 - is the most basic.
  • v2 - adds a new interface with some new functions, see: here and here. It also adds the whole IDirectInputEffect interface.
  • v3 - I could not find anything new added in v3.
  • v4 - same as v3?
  • v5 - added and modified several structures and added new definitions. See here, here, here, here, here, here, here, here, here, here, here, here, here, here, here, here, here, here, here, and here. Note: some of these really only work on v6 and above, since they are defined as 0x050a or something like that.
  • v6 - modified a structure and added new definitions. See here and here.
  • v7 - adds a new interface with some new functions, see: here, here and here. Also added and modified several structures and added new definitions. See here, here, here, here, and here.
  • v8 - The exported API changed in v8, see here. Also, added a whole new set of interfaces, see here and here. Added and modified several structures and added new definitions. See here, here, here, here, here, here, here, here, here.

Note: I pulled these by hand quickly so I may have made a mistake.

And is there any "gain" (aside of compatibility with external tools in itself) from the upgrade?

Currently, dinputto8 does nothing with the gain. However I could add config options to control the gain later.

elishacloud avatar Oct 06 '18 20:10 elishacloud

@StrikerMan780, I will also look into customizing the mouse pull rate to fix issues in the games you mentioned.

elishacloud avatar Oct 06 '18 21:10 elishacloud

I'm having a choppy, jittery etc. mouse movement as well, in KISS Psycho Circus: The Nightmare Child, a game from 2000 based on Lithtech Engine 1, and the custom dinput.dll did not change that. The movement is silky smooth with arrow keys but it makes smaller and bigger jumps when I evenly move the mouse. Someone pointed out that turning off VSync might solve the problem, but I haven't succeeded in forcing it to be turned off - there are no ingame settings, no entry in the cfg file, and neither Nvidia Profile Inspector nor Nvidia driver settings succeed in turning VSync off.

brazzjazz avatar Oct 20 '18 22:10 brazzjazz

I'm having a choppy, jittery etc. mouse movement as well, in KISS Psycho Circus: The Nightmare Child, a game from 2000 based on Lithtech Engine 1, and the custom dinput.dll did not change that. The movement is silky smooth with arrow keys but it makes smaller and bigger jumps when I evenly move the mouse. Someone pointed out that turning off VSync might solve the problem, but I haven't succeeded in forcing it to be turned off - there are no ingame settings, no entry in the cfg file, and neither Nvidia Profile Inspector nor Nvidia driver settings succeed in turning VSync off.

that is because the game limits its frame rate@60FPS,you need pcgamingwiki to seek for solution

NATO2000 avatar Apr 30 '22 08:04 NATO2000

dxwrapper can force v-sync off by setting the following options:

EnableVSync                = 0
ForceVsyncMode             = 1

elishacloud avatar Apr 30 '22 20:04 elishacloud

Disable HardWare cursor if it possible in game. In some games HW cursor so does. Exactly the same behavior i had in Space Rangers 2.

Mitradis avatar May 01 '22 16:05 Mitradis

I was finally able to reproduce this issue. It seems to be fixed with a dinput8wrapper from here: https://github.com/geeky/dinput8wrapper

If the game only used dinput you may need to enable dinputto8 from dxwrapper for this wrapper to work.

elishacloud avatar Apr 28 '23 20:04 elishacloud