univrsal / input-overlay

Show keyboard, gamepad and mouse input on stream
GNU General Public License v2.0
2.61k stars 234 forks source link

Stealing Partial Exclusivity #368

Open Hexaiter opened 9 months ago

Hexaiter commented 9 months ago

Describe the bug Input overlay is stealing partial exclusivity over the controllers. And by that, it means that there are a few programs that stop being able to read controller input while others do not. And one of them are window's built in Game Controllers control panel. Other programs that are affected are JoyToKey, as well as AutoHotKey.

To Reproduce

Expected behavior Game Controllers control panel, as well as any other program, should still be able to read inputs.

Media Examples I would record a video demonstrating how control is restored as soon as OBS is closed, but since I use OBS to record video that poses a problem.

Additional information:

I used my 8bitdo SN30 controller to test against different controller protocols. The good: Input Overlay will not steal input for dInput nor xInput mode The bad: Input Overlay WILL steal if it is in Switch mode. Then confirmed with an actual Switch Pro Controller.

Gamepad input stealing thankfully doesn't occur to the majority of programs/games from what I've seen. But the ones it does are useful tools, whether it's diagnostic, such as Window's own old built in configuration tool, to input management programs such as AutoHotKey.


Workaround Found I have found a way to regain control while still letting the Overlay plugin work. And it is a bit convoluted.

Recording of the workaround working, using https://gamepadviewer.com/ via capture window of firefox for showing the input being stolen by Input Overlay till Timespinner was opened then closed.

https://github.com/univrsal/input-overlay/assets/145405634/1ba041d3-37a0-4d89-9019-05e022cbc76c

It's a bit of a fortuitous moment just accidentally coming across the workaround. I occasionally stream the Timespinner randomizer, so I've ran into it's problems before. And have had to use HidHide to get things like Push to Talk to work while it's running, since it completely ignores your Disable Steam Input setting. Which might be part of why the workaround works since Steam Input has been known to steal input in general unless you disable it... usually. Playing Timespinner being an exception.

And it just so occurred a moment while setting something else up that, when I closed Timespinner, I noticed that JoyToKey regained access to reading inputs. Also it looks like when launching Steam it'll initialize Steam Input then stop it and that may be enough for Input Overlay to stop it's stealing from other opened programs.

End Notes

I hope this issue report is not too jumbled. While I was writing it I kept finding additional information of what was going on and updated as I could.

univrsal commented 9 months ago

This is probably more an issue with sdl2 than with input overlay as that's the library used for gamepad input. The plugin uses some hints to tell sdl2 how to configure gamepad input, but that's about it.

PhenaOfMari commented 1 month ago

Hey there, I found this issue a little while ago and just wanted to say I've just submitted a PR to SDL that should fix this issue when it lands in a release.

univrsal commented 2 days ago

I have updated the windows version of sdl to 2.30.4, so I assume this should be fixed now(?)