samuelgr / Xidi

DirectInput interface for XInput controllers
BSD 3-Clause "New" or "Revised" License
187 stars 10 forks source link

Remap POV-hat as LSTICK #5

Closed Hexaae closed 3 years ago

Hexaae commented 4 years ago

I've bought an Hori Fighting Stick Mini (XInput device) and found some games that ignore this joystick movements because they are detected as POV-hat, and not as LSTICK for movements :( Would be handy an additional XInput wrapper to just remap POV-hat to act as LSTICK...

samuelgr commented 4 years ago

To be investigated for a future version.

samuelgr commented 3 years ago

Fixed in v2.0.0. Please specify DigitalGamepad as the mapper type, and the d-pad will be mapped to X and Y axes.

Hexaae commented 3 years ago

Mmh, this doesn't seem to work with Jazz Jackrabbit 2 - The Secret Files... I tried everything... XBox controller + buttons do work, but adding: dinput.dll dinput8.dll winmm.dll (<-- game exe contains this) with xidi.ini containing:

[Mapper]
Type = DigitalGamepad

[Log]
Enabled = yes
Level = 4

does nothing: directions of my Hori Fighting Stick Mini (DPAD) are ignored but buttons work fine.

samuelgr commented 3 years ago

I have Jazz Jackrabbit 2 so I tested with it as well. A couple of questions:

Hexaae commented 3 years ago

The only log I've found (nothing on my dekstop) was in \Appdata\Roaming\Jazz2 (using Hori Fighting Stick Mini): https://pastebin.com/vVuNUjNW

No, DPAD of my XBox One BT does not work, only LSTICK.

Maybe this game does not use dinput or winmm.dll as input device? I could send you my game version (it's v.1.2.4) to test, maybe there's something unusual...? Please send me a private mail at this temp email address: jazz2tmp (at) incredibile.e4ward.com

samuelgr commented 3 years ago

But Xidi + DigitalGamepad does work with other games?

You're using another mod along with Xidi, right? It looks like a different mod might be interfering with Xidi being loaded at all, which is likely why you don't see any Xidi log show up on the desktop. I do not see any of the Xidi modules listed in the log you shared, and I also have v1.2.4 (The Secret Files).

Hexaae commented 3 years ago

Have to check again but I think so...

Hexaae commented 3 years ago

Doesn't work. Same with old Pitfall a Mayan Adventure (using winmm.dll browsing into the file with a hex-editor): I put in the exe directory winmm.dll (32bit) + xidi.ini containing:

[Mapper]
Type = DigitalGamepad

[Log]
Enabled = yes
Level = 4

But directions of my Hori Fighting Stick Mini (XINPUT device using DPAD signals) are not detected. Buttons do work. I can't find Xidi output logs either... It looks like it's not even loaded/used (!?)

Before you ask I do have Visual C++ installed:

image
Hexaae commented 3 years ago

Looks like winmm.dll in the exe dir won't get loaded/used at all... as I have no output log... but have also to report that normal XInput XBox One BT device works without XIDI, even though browsing with a hex-editor these games exe files (Pitfall Mayan Adventure, JJazz2...) actually use winmm.dll (??? winmm.dll and XInput XBox One controller works fine?). Only XInput Hori Fighting Stick Mini, which uses DPAD for directions does not work.

samuelgr commented 3 years ago

So just to confirm, the fighting stick works with DigitalGamepad in some games, but for Jazz Jackrabbit 2 and Pitfall Mayan Adventure it appears the winmm.dll form of Xidi isn't being loaded at all?

Hexaae commented 3 years ago

Tested once again with ZXSpin emulator and it's exactly as you said. It also generated the log ( https://pastebin.com/1zDs9AQy ) with ZXSpin, but seems totally ignored from JJ2 for example...

samuelgr commented 3 years ago

If you have all the required runtimes installed and you tried both the 32-bit versions and 64-bit versions of Xidi (I suspect the 32-bit version is the one you want for these older games), then it might be the case that these games - or some mods you might be using with them - are messing with the standard process for loading winmm.dll, which is why Xidi is not being loaded.

For example, I was able to reproduce the same issue with a modded version of Final Fantasy VII (i.e. it ignores the Xidi winmm.dll file and loads the system version instead), and on the other hand my completely unmodded version of JJ2 works fine with Xidi's winmm.dll file.

I do plan to try to fix the winmm.dll loading problem, which is a separate issue tracked in #18. However, I will close this issue since it seems Xidi + DigitalGamepad does make the fighting stick work in games that are able to load it.