briankendall / devreorder

A utility for reordering and hiding DirectInput controllers
329 stars 31 forks source link

Joystick input recognized differently #29

Open octagonphd opened 4 years ago

octagonphd commented 4 years ago

I've installed devreorder systemwide because I have applications that need it installed that way and it works well for them and I'm able to establish the controller order I'm looking for. However it's causing issues for games I don't really need it for i.e. MAME. I'm having an issue with MAME recognizing my joysticks as a different input code with the devreorder version of dinput8.dll versus the original version. With the original dinput8.dll files MAME will recognize inputs as "JOYCODE_1_HATSWITCHU" for UP on JOYSTICK 1. However with the devreorder version of the dll file MAME recognizes the input as "JOYCODE_1_U". This causes MAME problems and it will overwright the default configuration file with "JOYCODE_1_UNKNOWN_SWITCH" on the next launch. I tried to enter "mame64.exe" in the ignore processes section of the devreorder.ini file, but that didn't work. Any thoughts?

briankendall commented 4 years ago

When I get the chance -- no promises when that is! -- I'll try to see if I can reproduce this issue and find a fix.

In the meantime, what may work around this bug is copying the original dinput8.dll into the same folder as MAME's executable. In theory it will use that DLL instead of the one in the system folder and its behavior will return to normal. Could you give that a try let me know if that fixes things?

octagonphd commented 4 years ago

That's what I figured but sadly it didn't work. MAME still picked up the devreorder version. I can try again, maybe I mixed up the files. Thanks for taking a look.

briankendall commented 4 years ago

I can definitely reproduce the issue. I've also confirmed that if I copy dinput8.dll into the same folder as MAME64.exe that it will use that dll instead of the modified one in system32. And yet the problem still happens.

Frankly I'm a bit baffled by how this can be the case. The best thing I can suggest at this point is to uninstall devreorder system-wide and copy its version of dinput8.dll into the executable directory of any game that requires it. Hopefully in your case none of your games require it to be installed system-wide in order to work.

octagonphd commented 4 years ago

Thanks for confirming. After some additional testing I believe this is a MAME issue rather than an issue with devreorder. When I keep the original windows version in the system32 directory and copy the original windows version into the MAME directory I get the same weird behavior even though the devreorder version is out of the equation. MAME only recognizes the inputs correctly with the original windows version in system32 and nothing in the MAME folder it appears. I've only tested with mame64.exe but I may try with the 32 bit version to see if it behaves the same.