HarbourMasters / HarbourMasters/Shipwright

[BUG] Duplicate controller when using Steam Input

Open
#5,958 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
5.4k
Forks
837
Avg merge
1d 9h
Merged PRs (30d)
72

Description

This issue was initially discussed on discord: https://discord.com/channels/808039310850130000/1436835715475574948/1436835715475574948

When running SoH through steam, at first everything works. But as soon as I open the Steam Overlay and close it again (Shift + Tab in normal mode or Home Button on controller in Big Picture mode), the controller is duplicated in SoH. If I disable Steam Input, the duplicate vanishes, but it reappears if I re enable it.

Image

## Some data
OS: Windows 11 (latest version)
SoH: 9.1.1 (I also tried all other HM ports and saw the same behavior)

## Setup
I tried this with 2 controllers.

1. XBOX Series Controller, connected via blutooth, but also via USB.
2. Nintendo Switch Online N64 Controller, connected via blutooth (mor about this below).

While the issue occurs with both controllers, I only really noticed the issue with the N64 controller, because I wanted an N64 button layout template in Steam to use in this and some other games. But once the duplication came in, a button press seamed to trigger BOTH buttons, the default and the remapped one, thus triggering 2 actions in game. My concrete example was, that my B-Button and C-Down button triggered at the same time, giving me a sword swing and the error-sound for my empty deku nuts I had on C-Down.

I tried the same with my Xbox-Controller and saw the same behavior though, whether through Blutooth or USB.
It might be helpful to know, that when the game initially starts, the single controller detected seems to be the one with the modified button layout, not the "original" one.

The duplication doesn't seem to have any noticeable effect (at least to me) when buttons are not remapped, so I don't see menu skips for the control stick or anything like that, at least not in my rudimentary testing after I noticed the issue existed.

## Some more context
So, I do have a few things installed that COULD interfere with this. But I DID try uninstalling some of it, see below.

- **BetterJoy**: I use a branch with specific N64 controller support (https://github.com/mattdog1000000/BetterJoy/releases/tag/n64_no_triggers) to improve the controller compatibility
- **Sunshine**: I use it for game streaming to my TV. I DID try it through that, which is how I played this most of the time before noticed the issue, but the duplication was there nontheless, so I might just not have noticed it before.
- **ViGemBus** (1.16.116): It's a requirement for both BetterJoy and Sunshine. I also tried the newest version, but that didn't help (so I went back to the one officially supported by BetterJoy).
- **HidHide**: I used that to hide the "original" N64 controller so that applications only see the virtual controller from BetterJoy.

I did uninstall HidHide, Vigembus and BetterJoy, but the issue persisted. I can't guarantee, that non of it did leave something behind that COULD interfere in some way.

## What else I tried
I was linked this reddit thread in discord: https://www.reddit.com/r/Steam_Link/comments/9gxh5w/double_input_fix_for_xbox_and_nonsteam_controllers/

1. As per the first "solution" (to a different but similar problem) I removed the hidden xbox controller devices, but this didn't change anything.
2. I did try to replicate this issue in Dolphin, to see if it is SDL related. I wasn't able to replicate it, but as that apps architecture is a bit different (the main game window is separate from the settings window, and the steam overlay only works in the game window - no idea what that would mean for the interaction between Steam Input and the Settings window).

## Possible alternative solutions or workarounds
So, while I would like to use Steam Input, simply for the ease of reusing button mappings between games, there could be a few alternative solutions and workarounds that could work in this situation:
- I could disable one of the duplicates in SoH. But this is tedious as I would have to do it every time it occurs and since both controllers have the same name I don't really know which is the correct one.
- I could disable steam input and instead use profiles to save different button mappings in SoH, but switching between those would be a pain, especially via (potentially the wrong) controller from the living room.
- SoH could allow different button mappings for both controllers (right now they are treated as the same it seems and button mappings apply to both) - though this would be less portable to other games.
- I could see if other external tools allowed me to remap the buttons outside of steam, but the above list of tools and drivers is already longer than I'd like just to use a controller 😓

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.