KrossX / Durazno

XInput wrapper that allows controller customization
MIT License
204 stars 21 forks source link

Breaks when nvidia Game Stream is enabled #11

Closed fatalis closed 8 years ago

fatalis commented 8 years ago

due to game stream having it's own rxinput.dll which installs xinput IAT hooks (in theory everything should still be working but it isn't for whatever reason)

doesn't work even if you have game stream enabled but not currently using it

a workaround might be possible?

KrossX commented 8 years ago

If nVIDIA is using its own wrapper instead of global hooks, then you might be able to concatenate it with Durazno.

Rename nVIDIA's wrapper and put Durazno back in, then edit Durazno.ini and change the LoadDLL entry with nVIDIA's new filename. That should make the game load Durazno, which in turn would load nVIDIA's wrapper.

fatalis commented 8 years ago

It's not a wrapper though, it's using dll injection and IAT hooks. It's hooks successully call Durazno's wrapper funcs but for some reason the controller just doesn't work.

KrossX commented 8 years ago

Then I cannot think a good way around it. I suppose this would also affect x360ce and the like, bummer.

fatalis commented 8 years ago

I just tested x360ce and it works fine. FYI I'm using the x64 build and Dark Souls 2 SotFS.

KrossX commented 8 years ago

Weird. If x360ce works, then I would've assumed Durazno to also work.

If you put Durazno and delete the ini file, does the ini file still get created after running the game with gamestream?

fatalis commented 8 years ago

Yeah, it gets created. I also debugged it to make sure Durazno is being initialized fine and it was.

KrossX commented 8 years ago

Yet all the customization thing ain't happening...

Maybe settings aren't loaded for some reason and just uses default settings. Do you have some logs that you can send me?

fatalis commented 8 years ago

The controller doesn't work at all, so I don't see how it's just default settings.

Debugged it a bit. The game calls XInputGetState, which goes to the rxinput.dll hook, then for some reason that hook calls Durazno's XInputGetStateEx instead of it's XInputGetState. But all that behaves normally in x360ce so something's wrong with Durazno. Has your XInputGetStateEx been tested? (Seems like a rarely used function?)

KrossX commented 8 years ago

Alright, thanks for the information.

fatalis commented 8 years ago

Fixed for me by adding durazno_init(); in dllmain, so that GetProcAddress gets the correct address before rxinput hooks it. Probably too hacky to add to the official release though.

KrossX commented 8 years ago

Yeah, that was moved from dllmain... becase you shouldn't do those things from dllmain. =P

Can you give this build a try please? durazno_test3

PS: There's the possibility of too many warning messages...

zh32 commented 8 years ago

The build fixes the issue. BTW: I finally can play GTA 5 with a Logitech F710 with vibration, anti-deadzone and non-neutralizing triggers. Thanks!

KrossX commented 8 years ago

Yay! I merged those changes alredy so I'll consider this fixed then. =D