Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

DirectInput proper support possible? (e.g. BloodRayne 1/2) #870

Closed
reyaz006 opened this issue Oct 24, 2019 · 6 comments
Closed

DirectInput proper support possible? (e.g. BloodRayne 1/2) #870

reyaz006 opened this issue Oct 24, 2019 · 6 comments

Comments

@reyaz006
Copy link

reyaz006 commented Oct 24, 2019

So I wanted to try BloodRayne 2 with DS4 controller and it didn't go well.

Does DS4W work with dinput games at all? I found a note about Bluetooth not working with dinput but supposedly it should have been solved by now. Apparently either it did not or I'm missing something. Using wired mode didn't work for me, even with enabling "Dinput only" and disabling "Hide DS4".

The most quoted guide about adding controller support for the game is here: https://steamcommunity.com/sharedfiles/filedetails/?id=458151514
It uses XInput Plus tool. I've tried both latest version of it and archived file from the guide - it didn't work. Strangely, the XInput Plus config tool does recognize the DS4 and all inputs from it properly.

Here are 2 solutions that I found to actually work with the game:

  1. XInput Plus + GloSC + Steam Input. The general guide is here.
    Upon closer inspection, I've found that just the following config also works: GloSC + DS4W. However this means I have to use a shortcut from Steam to play the game, and it also involves non-working Steam overlay, weird invisible window that stays active even after the game is closed etc. Also, if I don't close that invisible window I can play just fine with just running the game from Steam, without the shortcut.

  2. InputMapper.
    Its UI is quite uncomfortable, and I was unable to solve issues with axis but at least it makes the game recognize my DS4 controller. It seems to be maintained by a single person.

So, both solutions introduce some inconveniences. But in case with GloSC it has an open source code. It appears to use the same ViGEm-driver as DS4W. I failed to understand what exactly needs to be done to support dinput games like BloodRayne, what GloSC does exactly, but I'm fairly sure it should be possible without additional software.

Also, are there any more workarounds I could try? Possibly with using less additional apps and layers.

Thanks

@mika-n
Copy link
Collaborator

mika-n commented Oct 24, 2019

Nowadays DS4Windows supports two types of output devices: xbox360 or dualshock4.
Some very old versions support only xbox360 output mode, so make sure you try the latest version of DS4Windows: https://github.com/Ryochan7/DS4Windows/releases

Try to use a profile with "Controller=dualshock4" output type because then the virtual output controller will be in dualshock4 format. See Settings and Controller output type option in a profile settings in DS4Windows app.
https://github.com/Ryochan7/DS4Windows/wiki/Settings

Also, if you use BT connection with dualshock4 output mode then you probably need to enable exclusive mode because the original "physical" controller device in BT may be seen as a dead controller in Windows (either "Hide DS4 Controller" option in DS4Windows or if you really cannot get it to work in your PC then HidGuardian device driver solution):
https://github.com/Ryochan7/DS4Windows/wiki/Exclusive-Mode-(Hide-DS4-Controller-config-option)-tips-and-issues

Of course there are various other reasons also (explained in the above linked page) why exclusiveMode/hidGuarian may be required ("double input" problem).

The use of UseDInputOnly is useful only if you use nothing but keyboard and mouse re-mapping options. You cannot re-map normal gamepad keys in UseDInputOnly mode.

And UseDInputOnly and HideDS4Controller options should not be used at the same time because then you would end up with no controllers at all:
https://github.com/Ryochan7/DS4Windows/wiki/Troubleshooting#games-dont-see-any-controller-not-the-virtual-gamepad-controller-or-physical-controller

https://github.com/Ryochan7/DS4Windows/wiki/Troubleshooting

@Ryochan7
Copy link
Owner

InputMapper and even Steam exhibit the same behavior regarding Bluetooth connections. Steam uses its own hooking method to hide the original DS4 from a game. DS4Windows can work with HidGuardian just like InputMapper does to force the original DS4 to be hidden. The old exclusive mode trick still works for me most of the time but there is a lot of software now that pretty much makes that old workaround useless (GeForce Experience suite).

Are you sure it is not just an issue with the game itself? I recently played the PC version of Soul Reaver and that game required a mod in order to get controller support working properly on modern systems. For that game, I found that using the DualShock 4 output mode was more responsive in game than using the Xbox 360 output mode and relying on the DirectInput interface.

@reyaz006
Copy link
Author

reyaz006 commented Oct 24, 2019

Thanks for replies.
Let me summarize the suggestions...

  • Update the DS4W - it was already updated.

  • Try changing this
    image
    to DS4 mode - tried now. After I change it in existing profile and press Save Profile, it doesn't save and reverts back to Xbox 360.
    Also, let me note that the whole thing with different modes like DS4/X360/Dinput in a variety of places confuses me, and I'm surely not the only one. If there was a place in a profile where all these options can be set it might be much more intuitive.

  • Enable "Hide DS4 Controller" option - it was already like that, it was the first thing I did when I started using DS4W in other games.

  • There is probably no need to use "Use Dinput only" option - alright, got it.

InputMapper and even Steam exhibit the same behavior regarding Bluetooth connections.

What do you mean by same behavior? Yes, with Steam Input only the game also did not detect the controller. But with InputMapper it did. All in wireless mode.

Steam uses its own hooking method to hide the original DS4 from a game. DS4Windows can work with HidGuardian just like InputMapper does to force the original DS4 to be hidden.

Like I've said earlier, the "Hide DS4" was already activated.

Are you sure it is not just an issue with the game itself?

I'm not sure, but then again - there is that guide that assumes there is a collection of dozens or hundreds of dinput-only games that do not work with Steam Input, and thus most likely do not work with DS4W.

Let me describe another test I did to emphasize a point.

Environment:

  • Steam is not running. I have Steam Input disabled but with BloodRayne 2 it can even work without Steam.
  • DS4W is running with my usual profile and settings, "Hide DS4" is enabled.
  • Xinput Plus is not installed in the game folder.
  • In [Control Panel \ Devices] I have "Wireless Controller" and "Xbox 360 Controller for Windows".

Test 1:

  • Run the game by launching br2.exe.
  • The DS4 is not recognized. The game says: "Make sure the gamepad is plugged." just like with no controllers connected.

Test 2:

  • Run the game through GloSC with this command line: ...\GloSC\SteamTarget.exe" "./targets/br2.ini"
  • The DS4 works fine with the game. Recognized and can be configured. Albeit only B1-B10 available vs. B1-B30 in case with Xinput Plus, but it works. Triggers can not be binded to actions though.

Note: While GloSC is running, in [Control Panel \ Devices] I see 4 additional devices named "HID-compliant Game Controller", on top of previous 2.

I conclude that GloSC does something extra that makes the dinput game recognize my controller. How does this work? I have no idea. Neither GloSC's readme nor its source code contains strings like "dinput" or "directinput". Can that "extra thing" be implemented in DS4W? I guess so. Maybe I'm wrong.

@mika-n
Copy link
Collaborator

mika-n commented Oct 25, 2019

  • Try changing this
    to DS4 mode - tried now. After I change it in existing profile and press Save Profile, it doesn't save and reverts back to Xbox 360.

There is a bug in the current version which breaks this Controller xbox360-vs-dualshock4 option in the GUI. You could modify that option by editing a profile file in Notepad, but fix to that bug is probably coming in few days.

  • Enable "Hide DS4 Controller" option - it was already like that, it was the first thing I did when I started using DS4W in other games.
  • In [Control Panel \ Devices] I have "Wireless Controller" and "Xbox 360 Controller for Windows".

Hmm... If you have both WirelessController and Xbox360 controllers visible then HideDS4Controller (=exclusive mode) activation failed. What do you see in Logs tabpage in DS4Windows? Do you see a warning message that exclusive mode failed? Go through tips in the following page. If you cannot get the exclusive mode to work then you may have to install HidGuardian tool to do the trick (and not enabling the option in DS4Windows).
https://github.com/Ryochan7/DS4Windows/wiki/Exclusive-Mode-(Hide-DS4-Controller-config-option)-tips-and-issues
https://github.com/Ryochan7/DS4Windows/wiki/DS4Windows-and-HIDGuardian-Install-and-Setup-Guide#hidguardian-test-installer

Also, please take a look at the following tip if/when you enable dualshock4 output controller mode in DS4Windows. Steam has a nasty feature to activitely ignore DS4 gamepad if Steam client detects DS4Windows and few other apps running in the background.
https://github.com/Ryochan7/DS4Windows/wiki/Troubleshooting#steam-doesnt-see-the-virtual-output-controller-if-a-profile-uses-the-dualshock4-output-type-steam-sees-the-ds4-controller-only-if-ds4windows-uses-xbox360-output-controller-type

@reyaz006
Copy link
Author

Hmm... If you have both WirelessController and Xbox360 controllers visible then HideDS4Controller (=exclusive mode) activation failed.

Wrong, I mean that I see 2 devices in [Control Panel \ Devices and printers]. In game controllers applet I see only one - the emulated xbox 360 one.

You could modify that option by editing a profile file in Notepad

Worked from what I see. I've changed "X360" to "DS4" in profile file and this changed the emulated device from "Xbox 360 Controller for Windows" to "HID-compliant Game Controller". In the game I see that B1-B16 are emulated and triggers can be set to actions too. Did just a quick test to confirm that and if I didn't miss anything then I call it perfect. Thanks. I'll get rid of InputMapper and do a reboot to make sure it still works well.

@reyaz006
Copy link
Author

reyaz006 commented Oct 26, 2019

I've got rid of extra software and confirm again that DS4W alone works well with BloodRayne 2 after setting this
image

However I have a suggestion. In profile edit menu, it might help to name the buttons according to Dinput scheme, e.g. Button 1, Button 2 ... Button 15 instead of Cross, Circle, Square etc. Maybe allow to just switch to desired scheme with a separate setting. I think some games also start with Button 0 so that might be another additional scheme.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants