mmatyas / pegasus-frontend

A cross platform, customizable graphical frontend for launching emulators and managing your game collection.
http://pegasus-frontend.org
Other
1.25k stars 113 forks source link

Android - controller input issues #328

Closed RexBorova closed 2 years ago

RexBorova commented 5 years ago

Not sure if this is a known issue on Android devices or not, but whenever I use Pegasus on my shield TV or my Galaxy S9 phone, navigating with the dpad and/or left analog stick will always give me double input. It will recognize an input from either or, and output both a press from the dpad and analog stick, if that makes sense. I've tried to unbind inputs for either dpad or analog but I can only rebind atm. Also, I cannot exit out of controller configurations holding down the "B" button. It will go have way and keep resetting, so I have to hard quit out to main menu. Just thought I should mention this in case anyone else has this same issue on Android devices. as well.

Edit: I've tested an Xbox one controller and a 8bitdo controller on android for this behavior. I've also tested the same Xbox controller on Win10 and works perfectly fine there. Tested stable and latest nightly build too.

mmatyas commented 5 years ago

Thanks for testing! So for example, using the default theme, when you press DPad Right, the selection goes 2 games to the right?

RexBorova commented 5 years ago

Correct @mmatyas , it takes the input of the dpad and left analog stick at the same time. So dpad up will go 2 games up, or even navigating the menu will move 2 spaces anywhere. Affects any theme i use too. This behavior only occurs on Android when I tested it, Windows 10 works flawless.

I also want to note that the Shield TV controller behaves perfectly fine with input, and also a wireless keyboard that I have used. This behavior only occurs with gamepads for some reason. Sorry for the late reply!

mmatyas commented 5 years ago

Hm so the Shield controller and the keyboard works fine, but the Xbox One and the 8bitdo controllers has this navigation issue?

mmatyas commented 5 years ago

Also, is this the kind of Shield controller you're using? I wonder if it works differently than the other controllers...

RexBorova commented 5 years ago

I have the Shield TV without that controller, just the Shield TV remote. I have not tested the Shield TV controller, but I can confirm that the Shield TV remote works properly along with my Logitech wireless keyboard and mouse that I use with a USB dongle. Just the Xbox one and 8bitdo Bluetooth controllers have issues with navigation.

mmatyas commented 5 years ago

I see, will look into the issue. Thanks for testing!

Purq commented 5 years ago

i noticed, that the right thumb stick is doing well - but not every controller have a (right) stick ...is there a possibility that android uses the left stick (also) as dpad and the right one actually as a "stick" ?

mmatyas commented 5 years ago

I think it's just that for some reason (compatibility?) dpad presses also acts as if the left stick was pressed, and left stick movements count as dpad presses too. No idea if this is an Android "feature" or a Qt bug or something.

Purq commented 5 years ago

Yes, i'm using / have used many android devices, also for emulation. But pegasus i only tested on FireTV Stick Gen3 and a Xoro TV streaming box (android 6.0 i think) ...i've tested a wired usb gamepad, a bluetooth pad by snakebyte and two wifi dongle based controllers - all controllers work fine on PC or the many android devices and only in Pegasus they skip one step in any direction

i can confirm, that on every android (based) device and on all of my gamepads the dpad and left thumb stick always have same function. but in the menu and the android apps this was never a problem. So i think it is a Qt thing... for example, after launching a game (and entering RetroArch), the problem vanishes

RexBorova commented 5 years ago

Just to add to this, I've tried my x360 controller with the wireless adapter, and I didn't have navigation issues. I'm beginning to think this is only an issue with wireless Bluetooth devices. I can navigate just fine with any device that uses it's own wireless dongle to connect ex: Xbox 360 Wireless controller with Wireless adapter, and my Logitech wireless KB and mouse with USB dongle. (Testing on latest stable 10 release)

mmatyas commented 5 years ago

Hm that's really interesting. Also didn't you mention the USB gamepad failing too?

Purq commented 5 years ago

For me, it makes no difference what kind of gamepad i use, usb wireless or bluetooth.

I think it's worth to mention, that the remotes (infrared? or at least mine) work fine. By Streaming box (Xoro HST 260) has a infrared based remote for the TV mode of the box, but works in Android AND pegasus fine (often the only way to get to some menu for me now) Same for my "magic remote" from my LG TV via CEC ...no problem. The remote of the FireTV (alexa version) also works fine (and this one is not infrared)

The "press and hold B" to quit the controls settings menu also a thing for me (the circle do not fill up around the B, it stucks at 25% ca. ..but when i i.e. hold the R2 button and then press B it sometimes works)

mmatyas commented 5 years ago

I've just managed to fix the navigation issue, there were indeed some duplications between the Dpad and the left stick. Tested with an Xbox One controller using regular Bluetooth, seems to be working fine now.

As for the back button, it seems when you hold down a button, it starts to get repeated, like when you hold a keyboard key in a text editor. Except with keyboards, Pegasus can detect which key presses were caused by this autorepeat, and which ones are real key presses. Now it seems the gamepad also autorepeats for some reason (which it should not do though), but does not mark the button presses as autogenerated. So it's as if you're repeatedly pressing and releasing the button (you can also see it if you try to open the main menu by holding down B). I wonder if this is a device specific thing, or happens with all controllers.

Purq commented 5 years ago

wow, sounds great! :) for the "repeated button", i have this issue with all my controllers (wifi and bluetooth)

mmatyas commented 5 years ago

I see, thanks. Guess it will need some more work then :)

RexBorova commented 5 years ago

I can confirm the same issue for the "repeated button" that @Purq mentioned. Great work as always and thank you very much @mmatyas , can't wait to test it out myself!

mmatyas commented 2 years ago

It's been a while, but as of the latest version, there's no longer any settings screen that uses press-and-hold for an action. I think this can be closed now.