Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent Hill 4 (GOG version) not detecting right analog stick/axis on Xbox Series X/S controller #34

Closed
r2rX opened this issue Oct 5, 2022 · 11 comments

Comments

@r2rX
Copy link

r2rX commented Oct 5, 2022

Hey @samuelgr , hope all is well.

After giving Silent Hill 3 a shot in Linux, which works perfectly with Xidi's dinput8.dll, I moved on to Silent Hill 4 (GOG version). GOG's dinput wrapper, dixi, doesn't seem to detect the left and right throttle triggers on my Xbox Series X/S controller in WINE. Testing it in Windows works fine. From checking the guid for my pad, via SDL, the value is different between Windows and Linux. As a result of dixi being hard-coded, as far as I understand, there's no method I've determined to work around that directly.

Thus Xidi was the intended solution. GOG's implementation is a dinput8.dll and an accompanying dixi.ini. I simply moved those files and placed Xidi's 32bit version of dinput8.dll instead. The game registers the controller and the throttle buttons (LT/RT) work!....except it doesn't detect the right analog stick/axis. Testing the same in Windows has the same result. Lastly, I also tried using Hookshot but the results, both in Linux and Windows, were the same.

Assuming GOG's implementation hasn't been hard-coded into the games executable in anyway, maybe there's a way to get the right analog stick/axis detected? It'd be great if this can work as counting on GOG to update their hard-coded database for existing and future controllers isn't dependable. Checking on their forums, as well as else where online, seems a reasonable amount of people are having issues even with "supported" controllers. Cheers!

@r2rX r2rX changed the title Silent Hill 4 (GOG version) not detecting right analog stick axis on Xbox Series X controller Silent Hill 4 (GOG version) not detecting right analog stick/axis on Xbox Series X/S controller Oct 5, 2022
@samuelgr
Copy link
Owner

samuelgr commented Oct 8, 2022

Do you have more info on how dixi configures the controller and what mapper you are trying to use with Xidi? I wonder if this game isn't hard-coded to detect very specific buttons and axes only.

@r2rX
Copy link
Author

r2rX commented Oct 8, 2022

So the GOG version comes with their implementation of dinput8.dll and it's accompanied by dixi.ini that lists presets for all the controllers that they include support for (i'll add them as an attachment). Thus I simply moved those two files aside and placed your implementation of dinput8.dll. To configure the controller mapping, there's an executable called SH4Config that offers a GUI for mapping the controller....or it can be done in-game. This also applies to the original retail version of the game. Once the mapping is finalize, a new file called input.ini is generated.

Speaking of which, what is curious is that I installed the retail version to test and, using your dinput8.dll, it worked perfectly fine. As far as I can tell, the difference between the retail and GOG version is the inclusion of GOG's dinput8.dll and dixi.ini.

gog_dixi.zip

@r2rX
Copy link
Author

r2rX commented Oct 8, 2022

Hey @samuelgr . I've gone through the process of re-testing the GOG and Retail versions, in both Linux and Windows, to put together some info that I hope will help.

Test Results.zip

@samuelgr
Copy link
Owner

samuelgr commented Oct 8, 2022

What happens if you configure Xidi to use a different mapper, like XInputNative? This probably isn't a good solution for the game, but trying it will at least give a bit more data.

Xidi.ini:

[Mapper]
Type                = XInputNative

@r2rX
Copy link
Author

r2rX commented Oct 8, 2022

So far, I haven't used Xidi.ini; just placed in the dinput8.dll as is (as I've similarly done for every other title I've tested). I'm assuming that I simply create a Xidi.ini file and paste the info above? Additionally, I also learned that the GOG version of the game is based of the European release, whereas my retail copy is US. I doubt that makes a difference but I'll test when I have a copy.

@samuelgr
Copy link
Owner

samuelgr commented Oct 8, 2022

Exactly, just copy and paste the above into a file called Xidi.ini placed in the same directory as Xidi's dinput8.dll. I would not be surprised if it caused some strange behavior in the game, but at least it would be useful to know which controller elements are detected and which are not.

@r2rX
Copy link
Author

r2rX commented Oct 8, 2022

Alright. I just tested using the XInputNative mapper and it behaves like Dixi's implementation; LT and RT aren't detected but the right analog stick is registered.

@samuelgr
Copy link
Owner

samuelgr commented Oct 8, 2022

We probably need to make a custom mapper for this game to work properly. Try this for your Xidi.ini:

[Mapper]
Type            = SH4


[CustomMapper:SH4]
Template        = StandardGamepad
StickRightX     = Axis(RotX)
StickRightY     = Axis(RotY)

@r2rX
Copy link
Author

r2rX commented Oct 8, 2022

[Mapper]
Type            = SH4


[CustomMapper:SH4]
Template        = StandardGamepad
StickRightX     = Axis(RotX)
StickRightY     = Axis(RotY)

You're a champ! That worked! :D This should be added to the GameConfigurations directory for Silent Hill 4 (GOG). As a bonus, I tested the European Retail version and it worked just the same as the US version.

I'll keep this in mind in the future, if encountering other titles that don't work with the .dll as is.

I sincerely appreciate you and your effort with this project. Thank you! 😄

@samuelgr
Copy link
Owner

samuelgr commented Oct 8, 2022

Glad to help, and my thoughts exactly on uploading a new configuration to the repository.

@samuelgr samuelgr closed this as completed Oct 8, 2022
@r2rX
Copy link
Author

r2rX commented Oct 8, 2022

Great! My only suggestion is to reference the GOG version in the title. The retail version doesn't need it but it should work regardless.

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

No branches or pull requests

2 participants