Code Monkey home page Code Monkey logo

elishacloud / dinputto8 Goto Github PK

View Code? Open in Web Editor NEW
104.0 5.0 10.0 213 KB

A dll module that is designed to improve compatibility in games using DirectInput 1-7 (dinput.dll) by converting all API calls to their equivalent DirectInput 8 (dinput8.dll) ones. This allows older games to be able to use newer tools and wrappers written for DirectInput 8.

License: zlib License

C++ 89.58% C 10.42%
dinput dinput8 directinput wrapper wrapper-dll game-development converter

dinputto8's People

Contributors

cookieplmonster avatar elishacloud avatar katas94 avatar nickninetheeagle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dinputto8's Issues

AVP2 Y Axis/Vertical movement

Hey, by default AVP2 (Alien versus Predator 2) have rly janky mouse movements on the Y axis, it's not straight at all (X/horizontal is fine)
PCgamingwiki suggested some older and more obscure wrappers, but they don't correctly fix the issue

If i try to use your wrapper, X axis movement still work correctly, i have to rebind the controls that used mouse buttons and they work but vertical/Y axis movement no longer work at all, nothing happen when moving my mouse vertically

do you know if that could be fixed ?
Thx for your work

Polaris SnoCross crashes at startup

Was hoping to use dinputto8 + devreorder to work around a bug with device enumeration in this game but dinputto8 doesn't seem work properly causing a startup crash. From looking with the debugger, it looks like IDirectInputDevice2A::GetCapabilities returns garbage data.

Log:

18804 23:38:48.111 Starting dinputto8 v1.0.54.0
18804 23:38:48.111 ASUSTeK COMPUTER INC. VivoBook_ASUSLaptop X513EAN_F513EA 1.0        (Notebook)
18804 23:38:48.111 ASUSTeK COMPUTER INC. X513EAN 1.0        (Notebook)
18804 23:38:48.112 Windows 10 Enterprise 64-bit (10.0.19041)
18804 23:38:48.112 SnoCross.exe (PID:13712)
18804 23:38:48.117 DirectInputCreateA
18804 23:38:48.117 DirectInputCreateEx
18804 23:38:48.117 Redirecting 'DirectInputCreate' IID_IDirectInputA version 0x500 to --> 'DirectInput8Create'
18804 23:38:48.126 Creating interface m_IDirectInputX::m_IDirectInputX(007BF620) converting interface from v1 to v8 using ANSI
18804 23:38:48.126 m_IDirectInputX::EnumDevicesX (007BF620)
18804 23:38:48.130 m_IDirectInputX::CreateDeviceExX (007BF620)
18804 23:38:48.130 Creating interface m_IDirectInputDeviceX::m_IDirectInputDeviceX(007A2A90) converting interface from v1 to v8 using ANSI
18804 23:38:48.130 m_IDirectInputDeviceX::QueryInterface (007A2A90)
18804 23:38:48.130 dinputto8::ProxyQueryInterface Query for IID_IDirectInputDevice2A from IID_IDirectInputDevice2A
18804 23:38:48.130 m_IDirectInputDeviceX::AddRef (007A2A90)
18804 23:38:48.130 m_IDirectInputDeviceX::Release (007A2A90)
18804 23:38:48.130 m_IDirectInputDeviceX::GetCapabilities (007A2A90)
18804 23:38:48.130 m_IDirectInputDeviceX::GetDeviceInfoX (007A2A90)

Does not work well with European Air War

The dll does not seem to work properly on EAW. It passes through to the native or third party input8.dll, but it doesn't seem to report the joysticks properly to the game itself.

For instance, what joystick it detects it doesn't seem to respond to inputs. And this is true for native input8.dll or third party input8.dll like devreorder.

Taking the dinput.dll out the game detects the joysticks and respond to it.

Disable FFB for NFS5

Hello, Dear dev. Could you tell me please how i can disable ffb for NFS5, because logitech G29 hasnt FFB in NFS5 and instead ffb I getting empty wheel without forcing. I want to use central force from G HUB. Thank you

My logs:
dinput.log

STCC/STCC2/V8 Challenge/Rally Masters think buttons are pressed continuously

I don't have specific info yet and it might not even be a dinputto8 bug, as I am running these games from within Sandboxie and I literally can't run these games without dinputto8 - but it seems like they think Button 8 (Start button on my Xbone pad?) is continuously pressed. Pressing and releasing it, or pressing other buttons has no effect, and so effectively I am unable to find gamepad buttons.

These afftected games all run on a very similar codebase:

  • Swedish Touring Car Championship
  • Swedish Touring Car Championship 2
  • V8 Challenge
  • Michelin Rally Masters

image

I suspect uninitialized data may be fed to the game and I'll try to troubleshoot it myself soon, so I am pretty much leaving this issue as-is here in case you go "Aha, I know what's going on".

EDIT:
Different games are not affected by this, even though they also run inside sandboxes - this could be isolated to a specific IDirectInput interface or a specific data format? But a conflict with Sandboxie seems unlikely.

NFS: Porsche Unleashed crashes on race load

Following instructions from PCGamingWiki I installed dinputto8 v1.0.39.0 and devreorder to try to add support for my Fanatec CSL Elite Wheel.

However this combination crashes the game once you try to start a race. I did some experimentation to try to narrow down what causes this:

  • without either dinputto8 and devreorder
    • can map buttons and analog controls of the Fanatec wheel in options menu
    • The race does not crash
    • The mapped buttons work, but the analog controls do not (this is what devreorder is supposed to fix)
    • Force feedback is working (can feel the forces and road in the wheel even if steering is unresponsive)
  • with only devreorder
    • behaves like the previous case
  • with only inputto8
    • can map buttons and analog controls of the Fanatec wheel in options menu
    • Race crashes on load
  • with both dinputto8 and devreorder
    • the device list is filtered properly
    • can map buttons and analog controls of the wheel in options menu
    • if the mapped device is the Xbox 360 controller, race runs and controls work
    • if any button or analog control on the Fanatec wheel is mapped, race crashes on load

My guess is that there's something in the way the Fanatec uses Direct Input that is not compatible with the API mapping that dinputto8 does. If there is anything I can do on my end to provide a more useful bug report or diagnostic data, please let me know.

Winmm to Dinput8 please?

Older games used Winmm prior Dinput, some modern games for some stupid reason still use it, like infamouse Deadly Premonition, for example.

[Rayman 2] No input is recognised

When attempting to use the wrapper with Rayman 2, no input is recognised either from the keyboard or from a gamepad. I tried both the pre-release build and my own build with the latest commits.

Log file:

11460 16:46:14.795 To Be Filled By O.E.M. To Be Filled By O.E.M. To Be Filled By O.E.M. (Desktop)
11460 16:46:14.795 ASRock H97M Pro4                        (Desktop)
11460 16:46:14.795 Windows 10 64-bit (10.0.17763)
11460 16:46:14.795 "Rayman2.exe" (PID:6404)
11460 16:46:14.797 Redirecting 'DirectInputCreate' IID_IDirectInputA version 0x500 to --> 'DirectInput8Create'

Disable logging

Is it possible to disable logging to dinput.log? Or can you please create such dxinput.dll with disabled logging?

Disable the logs

Hi,
Most users don't need this. Can I disable logs by default?

Force Feedback request

Hi,

I have multiple devices (Microsoft Sidewinder FFB 2, pedals, throttle, etc..) and most games don't allow to use more than one device.

To solve this problem I use vjoy that work fine for this, but unfortunatenly the games detect vjoy as
priimary Force Feeback device and not my real device Microsoft Sidewinder Force Feedback.

The final result is that the force feedback not work becouse the games send all effects to vjoy and not to my Sidewinder FFB 2 that is the real device.

I ask if is possible redirect all FFB effecs only to a real device (lìke my Sidewinder Force Feedback for example) and never to a virtual device (like vjoy for example)

Is possible do it ?

Die by the Sword -- in-game mouse input laggy and imprecise

This game has an option called VSIM which allows to precisely control weapon movements using the mouse (DbtS was famous for this at the time of the release). However, on Windows 10 64-bit the setting does not work correctly, and unfortunately the latest version of dinputto8 does not help.

Die by the Sword demo (Glide wrapper might be necessary on newer systems): https://archive.org/details/DiebytheSword_1020

Workaround for the problem with unresponsive in-game menus on newer systems: https://support.gog.com/hc/en-us/articles/212450929-Die-By-The-Sword-Limb-From-Limb-In-game-menu-problem

FYI - Fixes Star Wars Episode 1 Racer Startup Crashes

Hi Elisha
Just a quick thank-you for DINPUTTO8. A load of people (myself included) had problems with SWEp1Racer on PC (both CD and GOG versions), and your replacement DINPUT.DLL fixes it very nicely :-) Suggest you add the game to the list of fixed games so others might stumble across this solution too (and sell it to GOG :-) )

Device enumeration change between Win98 and WinXP

Further investigation into Polaris SnoCross has revealed that something changed about DirectInput device enumeration in Windows XP.
Under Windows 98, DirectInput lists USB keyboards and mice if you pass DIEDFL_INCLUDEALIASES flag with USB devices having the usual device type but with HID flag, e.g. 0x00010102. Under Windows XP, USB keyboards and mice are always listed and their type is set to 1 (DIDEVTYPE_DEVICE), so 0x00010001. This notably makes Polaris SnoCross crash if you have USB keyboard or mouse plugged in as its code breaks if it encounters device type that isn't 2, 3, or 4.
This seems like an issue within the scope of dinputto8 although I'm not sure what the best way to handle this is.

MechWarrior 4: Mercenaries Crash

Hello,
I have been enjoying this .DLL file for a while, as it allows me to use joysticks in MechWarrior 4: Mercenaries. Normally for modern systems, you have to launch the game with the /gosnojoystick parameter, disabling joystick support, otherwise the game crashes on launch. And what's the point of playing a mech game without joysticks, right?

However, the game experiences crashes using dinputto8 under two circumstances.

  1. You can play any single mission to completion successfully, however the game then crashes when you launch into a second mission.
  2. If you enter the settings menu and try to change your input bindings during a mission, the game will crash.

If I run the game with /gosnojoystick and without using the dinputto8 DLL file, I do not experience these crashes.
I'm not sure if this issue is the game's fault, or if there is something imperfect in the API translation of dinputto8 which is causing the game to crash. I have attached two log files (it looks like the two different types of crashes reference different memory addresses, so they may be different from each other), but please let me know if I can provide any further info. Thanks for maintaining this project, by the way! I was so excited when I found your DLL file and was able to play MW4 with HOTAS controls. This project has brought me literal joy, so kudos to you.

EDIT: I realized that the correct launch parameter is /gosnojoystick, not /gosnojoysticks plural. Edited text to use the correct launch parameter.

MW4 Crash.txt

MW4 Input Binding Crash.txt

Lightshot conflict?

It appears that dinputto8 is blocking Lightshot program in both Gothic and Gothic 2 games - can't take screenshots. It's working again if I remove dinput.dll file from game's /system folder. I'm using the latest 5.5.0.4 version of Lightshot and the latest 1.0.30.0 version of dinputto8.
Why would I need dinputto8 in Gothic and Gothic 2? Otherwise mouse is not moving in Steam Overlay.

Make DPAD == LeftStick

Hope it's not too off-topic...
I've bought a good old arcade joystick 🕹 Hori Fighting Stick Mini recognized by Windows 10 as XInput device with DPAD only for the stick movements.
Since some games don't support DPAD and expect to use only LSTICK, would be possible to create a special version of dinputto8 or a new dinput8.dll wrapper project able to remap DPAD == LSTICK for movements? 😥

alternative use of dinputto8

Hi,

I like to add force feedback support to some games that not support it.

Many old and not old games have already the file dinput.dll on folder.

Therically I need to create a DLL proxy and rederect to original renamed DLL ( dinput_ori.dll ).

I don't have too much exprerience in DLL proxy.

Frankly I searching for a more elegant way to do it.

I ask if possible work directly with your project and avoid to create a a sort of dinput_ori.dll to put in the game forlder.

Do you think is possible and it is a good idea ?

Thank you !

Add compatibility to Grand Prix Legends

I am writing to request Grand Prix Legends added to the list of compatible games. This game has support for a limited number of Joystick devices and it would be valuable to use tools like devreorder to control which HID devices are seen by the game and which order they are in. The game uses dinput.dll rather than dinput8.dll so the use of these tools is currently not possible.

Currently when trying to use dinputto8 for Grand Prix Legends the controllers are no longer recognized.

Input issues for Defiance (1997), dinputto8 does not currently help

I have this game that in the past when in Windows 7, worked perfectly fine for me but after a recent move to Windows 8.1, I decided to check up on this old game, and two strange issues have cropped up that completely break the game for me in terms of actually being able to play it.

In game, all inputs as they were last bound (except one important one) are recognized, but I cannot rebind keys in the options menu. When I go to pick a bind for a key, it won't recognize any inputs, and thus softlocks the game.

The biggest issue is that for some utterly strange reason, the Thrust key for the game (a very important key to bind as it's the essential movement function of the game) cannot be activated by me, but if it happens to be bound to any inputs, the game automatically registers it as being pressed continuously and basically I am unable to do anything within the game besides move around horizontally in a game designed around vertical movement.

Here's the demo version for which the issue also still happens: https://archive.org/details/defiancedemo

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.