thisismypassport / myinput

Maps keyboard keys to a virtual gamepad on a per-app basis, without having to install drivers.
MIT License
6 stars 0 forks source link

Steam Support? #2

Closed TemporaryPSP closed 1 month ago

TemporaryPSP commented 2 months ago

Can't seem to get Steam games to work with this, non Steam executables logs end with this: Initialized! Initializing thread... Found device via CfgMgr API Opening device via file API Opening xusb device Using async xusb api (from wgi?)

Meanwhile here are the Steam logs: steam.log Initializing... Loading config from: D:\MyInput\Configs\steam.ini ERROR: Failed to open: D:\MyInput\Configs\steam.ini Loading config from: D:\MyInput\Configs\_default.ini Mapping C to %A Mapping X to %B Mapping Z to %X Mapping V to %Y Mapping S to %LT Mapping A to %LB Mapping D to %RT Mapping F to %RB Mapping W to %L Mapping E to %R Mapping B to %Start Mapping G to %Back Mapping N to %Guide Mapping H to %Extra Mapping Left to %L.Left Mapping Right to %L.Right Mapping Up to %L.Up Mapping Down to %L.Down Mapping Delete to %R.Left Mapping PageDown to %R.Right Mapping Home to %R.Up Mapping End to %R.Down Mapping Numpad4 to %D.Left Mapping Numpad6 to %D.Right Mapping Numpad8 to %D.Up Mapping Numpad5 to %D.Down Mapping LShift to %Mod.L Mapping RShift to %Mod.R Mapping Q to %Mod.T Mapping F12 to Reload Mapping Pause to ToggleDisable Initialized! Initializing thread...

Game log Initializing... Loading config from: D:\MyInput\Configs\test.ini ERROR: Failed to open: D:\MyInput\Configs\test.ini Loading config from: D:\MyInput\Configs\_default.ini Mapping C to %A Mapping X to %B Mapping Z to %X Mapping V to %Y Mapping S to %LT Mapping A to %LB Mapping D to %RT Mapping F to %RB Mapping W to %L Mapping E to %R Mapping B to %Start Mapping G to %Back Mapping N to %Guide Mapping H to %Extra Mapping Left to %L.Left Mapping Right to %L.Right Mapping Up to %L.Up Mapping Down to %L.Down Mapping Delete to %R.Left Mapping PageDown to %R.Right Mapping Home to %R.Up Mapping End to %R.Down Mapping Numpad4 to %D.Left Mapping Numpad6 to %D.Right Mapping Numpad8 to %D.Up Mapping Numpad5 to %D.Down Mapping LShift to %Mod.L Mapping RShift to %Mod.R Mapping Q to %Mod.T Mapping F12 to Reload Mapping Pause to ToggleDisable Initialized! Initializing thread... Injecting into new process of same bitness "D:\Steam\steam.exe" steam://run/AppID//

thisismypassport commented 2 months ago
  1. Do you have Steam Input enabled? If so, does it work if you disable it?

For me, for the generic stream games I tried with, myinput worked with Stream Input disabled, but not with it enabled (I'll take a look why later).

  1. Does it help if you change the following line in the config file from:

    !InjectChildren = False

    to: !InjectChildren = False (Remove the #)

TemporaryPSP commented 2 months ago

Disabled on a per-game basis via properties, tried with and without InjectChildren. I am using the one-time launch though, should that matter in any way.

thisismypassport commented 2 months ago

Yeah, one-time launch is fine.

Two more possibilities: (First, add the # back to !InjectChildren)

  1. Make sure to fully close steam (right click on the steam icon in the notification area -> 'Exit Stream') before you use myinput with a game that relies on it for input.

Then, if you haven't already, try using one-time launch on the game itself (not on steam)

If that doesn't help:

  1. I did find out what prevented steam input for working - a steam process is processing input in the background, which isn't very well supported right now (I'll look if I can easily support it)..

This might be causing the issue for you, even if you're not using steam input.

A poor workaround for this, mostly for you to check and tell me if this is indeed the issue for you too:

In the config file, change:

!Forward = True

!Always = True

To: !Forward = True !Always = True

(Remove both #'s)

The main disadvantage of this workaround is:

TemporaryPSP commented 2 months ago

Almost every executables from Steam come with DRM so I could only test a few titles with noDRM exe, and as expected, controller's detected just fine. The same can't be said for the second workaround though.

thisismypassport commented 2 months ago

To make sure I read you right - you tried the second workaround and it didn't help, yes?

And the game runs fine when myinput is injected, the remapping just doesn't work? Does that mean the remapped keys do nothing, or do they do their original function before the remapping?

I find it odd that the steam DRM (that's what it is, right?) would silently block this, though I don't know much about DRM schemes.

thisismypassport commented 1 month ago

Do you have any specific examples of games that have this issue? (If there are many, listing them all would be great - just saying "all" or "most" doesn't help me understand if this issue is specific to your configuration or observable by anyone)

thisismypassport commented 1 month ago

Closing, as it doesn't seem like more information is coming, feel free to reopen or open a new issue

TemporaryPSP commented 1 month ago

Sorry. I eventually forgot about this. So I got it working on non-Steam titles like GOG for example. Steam titles (even those that do not rely on additional protections) just don't work, with or without SteamInput. Dead Rising for example (even 2) accepts XInput but myinput doesn't work with them because they're both on Steam.