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 112 forks source link

[Android] Actions that Require Holding a Button (e.g. Deleting Gamepath) is Not Working #875

Closed marvinstanley closed 2 years ago

marvinstanley commented 3 years ago

The issue

  1. Actions that require holding a button (e.g deleting gamepath or exitting from changing gamepath layout) is not working on Android.
  2. The progress bar/circle that appears when holding the button bugs out and "resets" to the beginning and the progress bar jitters. See the video for clarification.
Here is the video of the problem described. https://user-images.githubusercontent.com/48851139/128347018-239d4965-b22e-47c1-af19-979e2a8c2808.mp4 https://user-images.githubusercontent.com/48851139/128347052-14e3f325-308e-425a-92b4-4f97489844fd.mp4

System info

I tested this issue on 2 Android device, the problem is present on both tested device:

Device 1: OS: Android 10 RAM: 8 GB Device Model: Oneplus 6T

Device 2: OS: Android 9 RAM: 4 GB Device Model: Samsung Galaxy Tab S3

Controller Used: Xbox One S Wireless Controller

Pegasus version

I tested these 2 Pegasus FE version on both devices: Stable release: alpha15 (2021-05-04) Latest version: alpha15-23-g29ca7047 (2021-08-02)

Pegasus log

This is the log from my Oneplus 6T:
2021-08-05T18:52:52 [i] Pegasus alpha15-23-g29ca7047 (2021-08-02)
2021-08-05T18:52:52 [i] Running on Android  (10.0) (arm, android)
2021-08-05T18:52:52 [i] Qt version 5.15.2
2021-08-05T18:52:52 [i] Program settings loaded (`/storage/emulated/0/pegasus-frontend/settings.txt`)
2021-08-05T18:52:52 [i] Found locale `ar`
2021-08-05T18:52:52 [i] Found locale `bs`
2021-08-05T18:52:52 [i] Found locale `de`
2021-08-05T18:52:52 [i] Found locale `en-GB`
2021-08-05T18:52:52 [i] Found locale `en`
2021-08-05T18:52:52 [i] Found locale `es`
2021-08-05T18:52:52 [i] Found locale `fr`
2021-08-05T18:52:52 [i] Found locale `hu`
2021-08-05T18:52:52 [i] Found locale `ko`
2021-08-05T18:52:52 [i] Found locale `nl`
2021-08-05T18:52:52 [i] Found locale `pt-BR`
2021-08-05T18:52:52 [i] Found locale `ru`
2021-08-05T18:52:52 [i] Found locale `zh-TW`
2021-08-05T18:52:52 [i] Found locale `zh`
2021-08-05T18:52:52 [i] Locale set to `en`
2021-08-05T18:52:52 [i] Found theme `Pegasus Grid` at `:/themes/pegasus-theme-grid/`
2021-08-05T18:52:52 [i] Found theme `gameOS` at `/storage/emulated/0/pegasus-frontend/themes/gameOS-master/`
2021-08-05T18:52:52 [i] Found theme `clearOS` at `/storage/emulated/0/pegasus-frontend/themes/clearOS-main/`
2021-08-05T18:52:52 [i] Theme set to `gameOS` (`/storage/emulated/0/pegasus-frontend/themes/gameOS-master/`)
2021-08-05T18:52:52 [i] Gamepad: Connected device 0xf (generic)
2021-08-05T18:52:52 [i] Metafiles: Found `/storage/emulated/0/roms/Nintendo 3DS/metadata.txt`
2021-08-05T18:52:52 [i] Metafiles: Found `/storage/emulated/0/roms/Nintendo DS/metadata.txt`
2021-08-05T18:52:52 [i] Metafiles: Found `/storage/emulated/0/roms/Nintendo Wii/metadata.txt`
2021-08-05T18:52:52 [w] Metafiles: `/storage/emulated/0/roms/Nintendo Wii/metadata.txt`, line 34: Game file `/storage/emulated/0/roms/Nintendo Wii/The Last Story (USA).wbfs` doesn't seem to exist
2021-08-05T18:52:52 [i] Metafiles: Found `/storage/emulated/0/roms/PSP/metadata.txt`
2021-08-05T18:52:52 [i] Metafiles: Finished searching in 4ms
2021-08-05T18:52:52 [i] Media: Finished searching in 1ms
2021-08-05T18:52:52 [i] Logiqx: Finished searching in 0ms
2021-08-05T18:52:52 [i] Skraper Assets: 20 assets found
2021-08-05T18:52:52 [i] Skraper Assets: Finished searching in 4ms
2021-08-05T18:52:52 [i] Favorites: Finished searching in 0ms
2021-08-05T18:52:52 [i] Playtime: Finished searching in 3ms
2021-08-05T18:52:52 [i] Game list post-processing took 0ms
2021-08-05T18:52:52 [i] 10 games found
2021-08-05T18:52:53 [w] file:///storage/emulated/0/pegasus-frontend/themes/gameOS-master/ShowcaseView/ShowcaseViewMenu.qml:455:17: QML Image: Cannot open: file:///storage/emulated/0/pegasus-frontend/themes/gameOS-master/assets/images/logossvg/3ds.svg
2021-08-05T18:52:53 [w] file:///storage/emulated/0/pegasus-frontend/themes/gameOS-master/ShowcaseView/ShowcaseViewMenu.qml:455:17: QML Image: Cannot open: file:///storage/emulated/0/pegasus-frontend/themes/gameOS-master/assets/images/logossvg/nds.svg
2021-08-05T18:52:53 [w] file:///storage/emulated/0/pegasus-frontend/themes/gameOS-master/ShowcaseView/ShowcaseViewMenu.qml:455:17: QML Image: Cannot open: file:///storage/emulated/0/pegasus-frontend/themes/gameOS-master/assets/images/logossvg/wii.svg
2021-08-05T18:52:53 [w] file:///storage/emulated/0/pegasus-frontend/themes/gameOS-master/ShowcaseView/ShowcaseViewMenu.qml:455:17: QML Image: Cannot open: file:///storage/emulated/0/pegasus-frontend/themes/gameOS-master/assets/images/logossvg/psp.svg
2021-08-05T18:56:37 [i] Closing Pegasus, goodbye!
marvinstanley commented 3 years ago

Btw, does the Android version of Pegasus FE allows Changing Gamepad Layout?

I was trying to change the gamepad layout because the Pegasus FE on my Tab S3 tablet was not able to recognize LT and RT input from the Xbox One S Controller and I wasn't able to change any of the gamepad button layout.

LT and RT is recognized correctly on other apps/emulators on Android. (I don't why but Samsung decides that LT should be called as the Brake button and RT as the Gas button on my device, maybe this is the reason why Pegasus FE doesn't immediately recognize the inputs from LT and RT)

mmatyas commented 3 years ago

Hi, the button repeat sounds like #328. On Android, the system's built-in gamepad support is used, if you see weird button names, the problem then might be indeed there. In theory, remapping should also work, but if the system has troubles detecting the buttons, then what Pegasus receives will be likely also incorrect.

marvinstanley commented 3 years ago

In theory, remapping should also work, but if the system has troubles detecting the buttons, then what Pegasus receives will be likely also incorrect.

Hi, sorry for not being clear about this one @mmatyas . What I meant from my previous comment was that I was not able to change ANY of the remapping at all from the "Change Gamepad Layout" settings, even on the buttons that Pegasus immediately recognized such as ABYX. Here is what I mean.

Let's say I want to rebind the "Y" button, selecting the "Y" button box will have a red highlight correct? However, after selecting the "Y" button and wanting to rebind it by pressing "B", the red highlight on "Y" didn't disappear and "Y" was not bound to "B". Pressing "B" on my controller doesn't translate to pressing "Y" on the graphical joystick test from Pegasus, pressing "B" was still mapped to "B" and pressing "Y" was still mapped to "Y". I wasn't able to rebind any of the controller buttons on Pegasus FE Android at all. (I've tested this on both of my Android devices on this remapping problem is present on both of them).

However, I was able to easily remap my Xbox Controller on Windows 10. The red highlight on the selected button disappeared and the remapping works as intended. Sorry if my explanation confuses you.

mmatyas commented 3 years ago

I see, thanks for the detailed description! I'll see if I can reproduce this with one of my devices.

mmatyas commented 2 years ago

Ok, as of the latest version there's no longer any settings screen that uses press-and-hold for an action, so the original issue should be technically resolved now.

For the gamepad layout changing, that's still not supported on Android (Pegasus uses the layout provided by Android, which may or may not be correct). I'm planning to port the same gamepad handling module that's used on desktop, but that'll take some time.

As the original problem should be fixed, I think I'll close the issue for now.