Hollow Knight

Hollow Knight

49 个评价
Fix native support for DualSense/PS5 Controller
由 Makz 制作
The game (and steam) has some issues with native support for DualSense/PS5 Controller, this guide explains how to fix it.
2
3
   
奖励
收藏
已收藏
取消收藏
Introduction
Please note that this isn't 100% fix that will work for everyone. I am trying to collect possible solutions to the issue in this guide. Thank you!

When I started the game, I couldn't play at all with DualSense controller on native support. So I switched to steam input which allowed me to play. However, the button prompts were displayed for the Xbox controller, also it seemed that the controller did not always respond well (or its simply was my bad). When I tried to start the game again without steam input, either controls went insane in the main menu (for example, it moved up by itself) or the pause buttons didn't work. Later I decided to investigate how to fix it and found a related thread on Steam that explained how to do it without mods (didn't try it, but many people may suggest such). The disscussion here helped me, but I will explain it in detail below. I hope this helps someone to solve this problem quickly. Thank you.
1st step: disable Steam Input
First of all you need to disable steam input for the game. You can do this by opening the context menu on the game in the steam library and going to Properties -> Controller -> Override the Hollow Knight and select Disable Steam Input.


2nd step: disable Native Controller Input option
Next you need to disable native input in the game itself. So better to use mouse/keybord for this one, go to Options -> Controller and select Off for Native Controller Input. When you do it, the game will still show Xbox controller prompts. You should restart the game and after that it will show PS (Dualshock) prompts in this menu, like in a capture below.

Warning! The “Native Controller Input” option is only available in Windows build of the game. This guide is intended for that build. The workaround for Linux users is to run the game via Proton. To do this, go to Properties -> Compatibility and check the box Force the use of a specific Steam Play compatibility tool (select the appropriate version if necessary).


The controller should work now without any issues. Enjoy!
Fix for mapping issues (Linux)
I decided to include this section as it helped some users to solve their issues with controller. However I didn't have such issue myself. You can see more details on this GitHub Gist page[gist.github.com]. These are instructions from that post:
  1. Disable Steam Input (like mentioned above in this guide).
  2. Set the following as launch options:
    SDL_GAMECONTROLLERCONFIG="050000004c050000e60c000000810000,Sony DualSense ,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux," %command%
  3. OR If the 2nd doesn't work, try this instead:
    SDL_DYNAMIC_API=/home/USERNAME/.steam/root/ubuntu12_32/steam-runtime/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 %command%
    where USERNAME should be replaced with your OS user name
For macOS users
This guide section was provided by another user as a possible solution for macOS users.
These instructions are copied for quick viewing, but please refer to this GitHub Gist page[gist.github.com] for future updates/improvements.

  1. Download[drive.google.com] the patched library Assembly-СSharp.dll so that the game recognizes the controller connected via Bluetooth.

  2. Replace the existing Assembly-CSharp.dll by moving the new file to the game's directory at the path
    ~/Library/Application Support/Steam/steamapps/common/Hollow Knight/hollow_knight.app/Contents/Resources/Data/Managed
    To do this in Finder, use the shortcut Shift+Command+G, paste the path to the folder, and press Enter.

  3. Connect the DualSense Controller via Bluetooth or USB-C.

  4. Launch the game and go to Options - Controller, then set Native Controller Input to ON.

    Enable Native Controller Input

    Restart the game.

The controller should now work!

In the game's Steam launch options, you can enable Steam Input, download a community layout for DualSense, and configure screenshot creation on the Share button.

Issues:
  • The controller's haptic feedback will not work in the game.
  • It was not possible to assign ESC (Menu Pause) and I (Inventory); they are simply ignored by the game.
Didn't work out for me
You can still check other things that might help (or not):
  • Connect the controller via cable or Bluetooth.
  • Any app that may interfere with controller input (e.g. controller emulation or similar).
  • Toggle some options related to controller settings, who knows maybe that one will work for you.
I would be thankful if you could share what worked for you. I will try to update this section based on the provided feedback.
44 条留言
Schneider(9er) Zero 10 月 28 日 下午 4:36 
Worked for me! Running native linux (no proton) on Linux Mint with a PS5 controller. Disabled steam input and the first launch option seemed to do the trick.

Thanks!!!
BarCB 10 月 24 日 下午 8:51 
For my PS5 controller the native linux run did not work, force it to run with proton
Elude6655 10 月 22 日 上午 2:58 
Much thanks! With the second option (SDL_DYNAMIC_API=...) my sony ps5 dualsense controller (I try to add a ton of keywords here to help people searching for the fix) worked properly. The first option (SDL_GAMECONTROLLERCONFIG=...) didn't fix anything tho, but I didn't tweaked with it, so maybe it would have done the trick if I took the time to check everything button by button
Oregano 10 月 1 日 上午 10:04 
now my question is how do i override it =)) cause i want to use steaminput to emulate mouse and keyboard in a game instead of the dualsense, and for some reason it just doesn't work
slim_reaper 9 月 28 日 上午 10:27 
Thank you very much, especially in the Linux part, an entire day I've been trying to fix my dual-shock with hk and ended up do that:
"the workaround for Linux users is to run the game via Proton. To do this, go to Properties -> Compatibility and check the box Force the use of a specific Steam Play compatibility tool (select the appropriate version if necessary)."

Then my DS4 works like butter!
SireEvalish 9 月 26 日 下午 10:46 
Doesn't work with Dualsense.
Wazural 9 月 17 日 上午 7:17 
(windows) my ps 5 controller still doesnt work only my ps4 controller
Nefastus 9 月 14 日 上午 4:15 
Doesn't work for me. The game detects it as an Xbox controller, even though it's a PS5 dualsense one.
Makz  [作者] 9 月 14 日 上午 3:13 
I updated the guide, added section for macOS users. Shout-out for M A T R I X F E L L O for the provided instructions. You can check original guide by provided link in that section. Feedback is welcome.
13VF 9 月 11 日 下午 2:06 
@Ryanuve ty mate, worked for me