briankendall / devreorder

A utility for reordering and hiding DirectInput controllers
318 stars 30 forks source link

Support ASI loader #52

Open mwisnicki opened 5 months ago

mwisnicki commented 5 months ago

I need to combine this with another mod (https://github.com/VaanaCZ/LANVP) that also uses dinput8.dll method.

I tried using ASI loader and renaming both mods to *.asi but only LANVP seems to work and devreorder doesn't.

briankendall commented 5 months ago

I took a quick peak at the source code for LANVP, and it looks like it explicitly loads dinput8 in the Windows\system32 folder. So I think you'll need to install devreorder system wide (i.e. in the system32 folder) in order for them to work together.

mwisnicki commented 5 months ago

Thanks for having a look. I should've been more clear that I used Ultimate ASI Loader in my attempt to load both.

So the dinput8.dll is actually the ASI loader and it is supposed to load all dlls with .asi extension. I wasn't able to find any documentation how this is supposed to work but I guess it just triggers DllMain in all of them and symbols are resolved from the first library to load? If that is correct then loading of dinput8 from inside LANVP should have no effect when using ASI loader since ASI loader would hook dinput first(?).

I found a workaround though - I renamed devreoder to dinput8Hooked.dll in game folder and ASI loader picked that up. Not sure why this works and the *.asi method doesn't.