shiiion / dolphin

Dolphin fork intended to give Metroid Prime Trilogy mouselook controls
Other
469 stars 43 forks source link

[Steam Deck] PrimeHack glitches out Steam's inputs (i.e. double DPad inputs) #158

Open ShadowOne333 opened 7 months ago

ShadowOne333 commented 7 months ago

Running any PrimeHack game through SteamOS glitches out the inputs when it comes to Steam in general, be it in Big Picture Mode (the one used for Gaming mode in SteamOS for Steam Deck) or in Desktop Mode. What happens is that upon opening PrimeHack by itself, the inputs start behaving weirdly, and this also applies to any game that relies on PrimeHack.

When opening the overlay the inputs are somewhat messed up.

Trying to press the D-Pad to navigate the Steam Overlay gives double inputs, for example, trying to press up automatically changes the selected option to 2 options above the previous one. The same happens when pressing down, right or left, so it's basically a double input with the D-Pad. Not only that, but other buttons behave oddly, for example pressing the B Button on the Deck opens up the Overlay when in the main menu, but pressing B again to close it simply opens it up again, so you can't close the Overlay with the B Button, only way to close it is with the "Steam" button.

Additionally, trying to play through SteamOS Desktop mode also has it's own share of issues. Trying to switch to any other application outside of PrimeHack breaks the On-screen keyboard, while the keyboard does pop up, you cannot type with it as it normally would, since it seems to be trying to make a click wherever the mouse arrow is, instead of where the highlighted key is on the keyboard. Also, the trackpad starts functioning oddly as soon as PrimeHack opens up in Desktop mode, it becomes way too sensitive and starts clicking without doing a full trackpad press.

These are just some of the issues I have stumbled upon, but it seems like others are also experiencing this. I'm not sure if this issue is solely related to PrimeHack or if it also affects Dolphin itself, since I have yet to try Dolphin on its own in my Steam Deck, but some people seem to have also experienced this with Dolphin as well:

https://www.reddit.com/r/SteamDeck/comments/18nmk4r/double_input_when_using_dpad_on_steam_deck_and/ https://www.reddit.com/r/SteamDeck/comments/18hef86/double_inputs_after_using_dolphin_emulator/ https://www.reddit.com/r/EmuDeck/comments/1886pab/steam_deck_double_inputs_on_steam_deck_after/

For some, rolling back to previous versions of the Flatpak seems to make it work, but that means that the current latest version that the package manager uses will always download the current one with the input issues.

For reference, when in gaming mode, the issue corrects itself if you put the Steam Deck to sleep by pressing the power button. However, if you're running a PrimeHack game, upon awakening the Steam Deck, the issue comes back up in just a few moments, the issue only corrects itself when PrimeHack is not opened at all. This doesn't work for Desktop Mode, however.

ShadowOne333 commented 7 months ago

For reference, here's the same issue report I made on Dolphin's Flatpak repo, and they mentioned fixing this based on a mainline Dolphin fix found here: https://bugs.dolphin-emu.org/issues/13412

Seems to have been fixed in Dolphin 5.0-20923 with this specific commit: https://github.com/dolphin-emu/dolphin/commit/c3b8aa1fe582d9798939a1975e559ad4a69c3f02 However, as of today, PrimeHack's current version on Steam Deck is bd2591a, with the exact version of the revision being bd2591a28ab4a367a3f11f65059e07314a13f081 For comparison, main Dolphin on SteamOS through Flatpak is currently at version 5.0-21088, and this one does seem to behave properly with Steam's inputs, both in Desktop and Game modes.

alfredo-escobar commented 3 months ago

I encountered this issue today.

SteamOS has a basic Keyboard+Mouse mapping that normally gets activated when entering Desktop mode, and then shortly after gets deactivated when Steam starts running (and it applies its own SteamInput desktop mappings). This SteamOS mapping normally should only get reactivated once Steam gets closed, so that the user can still navigate the desktop even when Steam is not running. For some reason, this mapping gets reactivated when starting PrimeHack.

This makes it so that a lot of buttons end up triggering two actions, for example:

I suspect the increase in sensitivity of the trackpad is also because of this, since the pointer traveled distance outputted by the SteamOS mapping would add up with that of SteamInput.

In desktop mode, a way to reverse this without restarting the device is to close and reopen Steam.

I tested the latest releases of Dolphin and other emulators (PCSX2, melonDS and Cemu) and they don't show this behavior.

SampoVirtanen commented 3 months ago

Is there still no fix for this? Or even a workaround?

ShadowOne333 commented 3 months ago

I had to downgrade Primehack to 1.0.6 due to this bug. It really makes controlling the Steam overlay hard. I'll wait on a fix for this to update properly

SampoVirtanen commented 3 months ago

How'd you do that? I used this method, and the earliest commit I can see is commit 41605f23e31a44689862dccfc5a3155b8bdf046141f4c92157cc23b70f16645a from 2023-12-20, which, according to #151 seems to be version 1.0.7.

ShadowOne333 commented 3 months ago

To be honest I don't remember what I did to downgrade. I think I used Emudeck's guide on how to downgrade PrimeHack from here: https://emudeck.github.io/emulators/steamos/primehack/#how-to-roll-back-primehack-to-an-older-version

Try tracking down the commit version that 1.0.6 or 1.0.6a uses, then follow what the guide says.

Stewmath commented 3 months ago

I submitted a pull request to the flatpak repo: https://github.com/flathub/io.github.shiiion.primehack/pull/33

Obviously it would be better if your pull request were merged into primehack though.

SirMangler commented 2 months ago

This will be fixed when we next rebase, which will hopefully be soon. The flatpak will be updated at the same time.