godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.38k stars 21.26k forks source link

SteamInput can fail on Windows #98208

Open lrahmann opened 1 month ago

lrahmann commented 1 month ago

Tested versions

4.dev [6699ae7]

System information

Godot v4.3 - Windows 10 D3D12 (Forward+)

Issue description

There are multiple bugs when using Steam Input with Godot under Windows currently.

Both of these will probably be obsolete when using SDL for controllers instead of XInput/DirectInput so I'm not sure if worth it to be fixed. But as a lot of games will be using Steam on Windows for distribution and may run into this issue aswell.

Steps to reproduce

For Steam Input to be active the game needs to be run via Steam (either as a game on Steam or using the "Add a Non-Steam Game to My Library" functionality.

Minimal reproduction project (MRP)

Any recent Godot game will do. If needed I can provide a Steam App with a special branch for this issue.

Calinou commented 1 month ago

As a workaround, players can set up Valve Plug to forcibly disable Steam Input.

lrahmann commented 1 month ago

Sadly not because of #81191 otherwise we could disable Steam Input via the backend as a default. Getting players to setup Valve Plug is probably to technical and also not all players with this issue contact us directly. I made a workaround around the issue in our fork but its more of a hack, regularly polling the XInput API to check if controller state changed somehow.