hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.01k stars 2.15k forks source link

[Android] Dpad not working on MIUI (Xiaomi) phones #14540

Open DorylPlz opened 3 years ago

DorylPlz commented 3 years ago

What happens?

Like i said in the title, for some reason i can't find any explanation, the DPAD doesn't work for me. Right now i'm using a POCO F3 (8gb ver) with android 11 (MIUI 12.5.1) and a Razer Kishi with the latest firmware, and for some reason the dpad doesn't work at this moment, right now i'm using the latest version of the emulator (1.11.3), i tried with both the gold version and the free one and still not working, ofcourse i tried to remap the buttons, but the emulator doesn't even recognizes the inputs.

Also i have to mention, i tried an xbox one s controlles and got the same result.

Also, i tried "Other emulator" based on this one, actually i'm thinking it's the same as this one but with adds and that one recognizes instantly the inputs, so with that test i'm discarding the option of being my phone or one of the joysticks the issue.

What hardware / device and operating system?

-Poco F3 8gb -Android 11 (MIUI 12.5.1 -Razer Kishi -Xbox One S Controller

What graphics card (GPU) or mobile phone model?

-Poco F3 8gb

What PPSSPP version (standalone/official), and did it work before?

1.11.3, official, i don't know, it works in an alternative version

Which game or games?

In general, the issue is in the button mapping section

ghost commented 3 years ago

Try development version here 👉 https://buildbot.orphis.net/ppsspp/

DorylPlz commented 3 years ago

Try development version here 👉 https://buildbot.orphis.net/ppsspp/

Tested from v1.9.3-770-gd4b695cb7 to the latest one and none works

Saramagrean commented 3 years ago

Try this one? https://www.reddit.com/r/tasker/comments/k2a9sa/tasker_profile_to_work_around_issue_with_android/

DorylPlz commented 3 years ago

Try this one? https://www.reddit.com/r/tasker/comments/k2a9sa/tasker_profile_to_work_around_issue_with_android/

Tried that, already granted permisions via adb and used the tasks on the first comment because of the razer kishi, and still noting, btw, i already had avary accesibility option disabled, so i assume it's more like a ppsspp issue than the system, since like i said, it works like intended in the alternative version i tried

DorylPlz commented 3 years ago

BTW, something i forgot to mention, previously i had a xiaomi note 9 with android 10 (MIUI 11) and the dpad of the xbox one controller wasn't working on this emulator too, after all of this troubleshooting i also tested both gamepads on a samsung a30 and both worked just fine, so maybe it could be the emulator having issues with MIUI specifically

magicdmer commented 3 years ago

I meet the same problem , i use Xiaomi 10 Pro with miui 12.5 (android 11) . My bluetooth gamepad's d-pad and analogue sticks not being recognised in ppsspp, but NDS and NES simulator is ok. And it can control android desktop sliding use d-pad or analogue sticks.

DorylPlz commented 3 years ago

I'll change the title to not working on MIUI phones then, since there are already 3 xiaomi phones with the same issue

hrydgard commented 3 years ago

Wonder if it's related to https://issuetracker.google.com/issues/163120692 . But I would have expected other emulators to also fail then. Strange..

magicdmer commented 3 years ago

Wonder if it's related to https://issuetracker.google.com/issues/163120692 . But I would have expected other emulators to also fail then. Strange..

Yes, many nes emulator is not working , like NES.emu . The only app i tested that works well is a chinese many in one emulator , it's GBA emulator and NES emulator work fine.

DorylPlz commented 3 years ago

Wonder if it's related to https://issuetracker.google.com/issues/163120692 . But I would have expected other emulators to also fail then. Strange..

Not much, the note 9 i had was on android 10 when i tested

hrydgard commented 3 years ago

So does it help to follow the advice in that issue and turn of all accessibility settings on the phone?

(Hopefully Google will fix this nonsense in Android 12...)

DorylPlz commented 3 years ago

So does it help to follow the advice in that issue and turn of all accessibility settings on the phone?

(Hopefully Google will fix this nonsense in Android 12...)

No, it appears to be a MIUI specific issue, if it help on something, i downloaded game controller keymapper and apparently MIUI recognizes the dpad as a stick. Also, i tested a chinese clone of this emulator called "Rocket PSP Emulator" and it recognizes the dpad fine

hrydgard commented 3 years ago

PPSSPP is GPL, since "Rocket PSP Emulator" uses PPSSPP code, they are required to release their full source code or it's illegal (although being in China, hard to enforce). Have they done so anywhere? Would be interesting to see what workaround they have.

DorylPlz commented 3 years ago

Well, i sent an email to the one listed on google play, but i doubt the would reply. BTW, i recorded how the buttons are recognized on keymapper, maybe this could give you a better idea on how the buttons are mapped on this system https://youtu.be/aXhky707jeQ

hrydgard commented 3 years ago

The arrows blink but nothing shows under Raw Axis/Key values when the DPAD buttons are pressed? That's really odd.

DorylPlz commented 3 years ago

On the other hand, "Gamepad Tester" shows the actual button pressed Screenshot_2021-08-21-17-16-38-552_com chimera saturday evogamepadtester

hrydgard commented 3 years ago

If it's getting a DPAD_DOWN, I'm confused as to why PPSSPP wouldn't react to it. You should at least be able to map it manually in control settings.

hrydgard commented 3 years ago

Did the latest commit help, by any chance?

DorylPlz commented 3 years ago

Later i'll try it, rn it's 4a.m 😅

DorylPlz commented 3 years ago

Did the latest commit help, by any chance?

Sorry, yesterday i forgot, now i tested the latest build and yes, it works as intended!, thx

hrydgard commented 3 years ago

Oh great! Thanks for testing.

I'm going to close this, please reopen if there are further issues.

magicdmer commented 3 years ago

Ok, i test lastest master , The problem remains. image

and i test "Rocket PSP Emulator" , not work

so i test "Gamepad Tester", it can recognize my d-pad and analogue sticks

image

hrydgard commented 3 years ago

@magicdmer Which signals do you see changing in gamepad tester when you move the DPAD? HAT_X/HAT_Y or some buttons?

Have you checked if gameplay is different from navigating the PPSSPP menu? Can you map the DPAD in Settings/Controls/Control Mapper?

magicdmer commented 3 years ago

@magicdmer Which signals do you see changing in gamepad tester when you move the DPAD? HAT_X/HAT_Y or some buttons?

up+down: HAT_X left+right: HAT_Y

Have you checked if gameplay is different from navigating the PPSSPP menu? Can you map the DPAD in Settings/Controls/Control Mapper?

As before, i can't map key in control mapper, there is no response when i press dpad key

iamcco commented 2 years ago

Same issue here, any workaround?

takeshineale128 commented 2 years ago

switch pro controller d-pad also doesn't work on mi 11