Coder Social home page Coder Social logo

Comments (11)

elishacloud avatar elishacloud commented on August 19, 2024 2

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.

from dxwrapper.

elishacloud avatar elishacloud commented on August 19, 2024 2

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

from dxwrapper.

elishacloud avatar elishacloud commented on August 19, 2024 1

@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

from dxwrapper.

elishacloud avatar elishacloud commented on August 19, 2024

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

from dxwrapper.

mirh avatar mirh commented on August 19, 2024

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?

from dxwrapper.

brazzjazz avatar brazzjazz commented on August 19, 2024

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.

from dxwrapper.

NATO2000 avatar NATO2000 commented on August 19, 2024

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

from dxwrapper.

elishacloud avatar elishacloud commented on August 19, 2024

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

EnableVSync                = 0
ForceVsyncMode             = 1

from dxwrapper.

Mitradis avatar Mitradis commented on August 19, 2024

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.

from dxwrapper.

elishacloud avatar elishacloud commented on August 19, 2024

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.

from dxwrapper.

elishacloud avatar elishacloud commented on August 19, 2024

I just added some features to dxwrapper that should help with this:

  1. FixHighFrequencyMouse
  2. DeviceLookupCacheTime

Enabling FixHighFrequencyMouse will help with a number of issues, including cases where the games frame rate is too slow or the mouse input speed is too fast. It also helps if the game does not correctly support DirectInput's buffer overflow code.

Setting DeviceLookupCacheTime to a larger number helps with games that try and enumerate the attached devices too often, leading to shuttering and other input slowdowns.

Try this update: dxwrapper.zip

from dxwrapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.