Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select and Start buttons are not working on Razer Serval #10228

Open
MBaliver opened this issue Dec 2, 2017 · 6 comments
Open

Select and Start buttons are not working on Razer Serval #10228

MBaliver opened this issue Dec 2, 2017 · 6 comments

Comments

@MBaliver
Copy link

MBaliver commented Dec 2, 2017

What happens?
When using the BT Controller Razer Serval, Start and Select inputs shows up as "btn.??" meaning it could be used by both since both are "unknown buttons".

What should happen?
Other emulators fixes this by binding Select as "314" and Start as "315" so they no longer would be considered being the same button as long as ignoring the back button as seen in:

         // The Serval has a couple of unknown buttons that are start and select. It also has
        // a back button which we want to ignore since there's already a select button.
        else if (devName.contains("Razer Serval")) {
            context.isServal = true;
            context.ignoreBack = true;
        }

and

    // If this is a Serval controller sending an unknown key code, it's probably
    // the start and select buttons
    else if (context.isServal && event.getKeyCode() == KeyEvent.KEYCODE_UNKNOWN) {
        switch (event.getScanCode())  {
            case 314:
                return KeyEvent.KEYCODE_BUTTON_SELECT;
            case 315:
                return KeyEvent.KEYCODE_BUTTON_START;

What hardware and operating system are you running PPSSPP on? GPU might matter if it's a graphical issue.

I'm on a Nexus 6P running Android Oreo 8.1.

@hrydgard
Copy link
Owner

hrydgard commented Dec 2, 2017

Even if they both show up as "??" they should still behave distinct. Did you try it, and do you really see both the on screen buttons being pressed when you only press one of them, if you map them separately?

That said, we could definitely improve how unknown buttons are displayed.

@hrydgard hrydgard added this to the v1.6.0 milestone Dec 2, 2017
@MBaliver
Copy link
Author

MBaliver commented Dec 2, 2017

They do, on PPSSPP it's like they're the same button at all but they're not. As far as I understood the problem, the app needs to differentiate both buttons by setting their own values. I know it may be way too hard(or impossible) without actually having the controller in hands to debug but I'll do my best to help.

I've got that "possible workaround" from here: http://forums.ppsspp.org/showthread.php?tid=16801

Edit:
ppsspp
epsxe

I've uploaded two screenshots on how both emulators mentioned on that link manages the Start and Select buttons.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Dec 2, 2017

PPSSPP on SDL platforms is using gamecontrollerdb.txt, so as long as the gamepad get's added, it should simply work without even remapping, there's no reason for any weird hackery. We just need an interface for adding new mappings to that file or some solution that doesn't care about providing human-readable input. Otherwise you have to use third party tools like SDL2 ControllerMap - which exists for all SDL platforms, but migt not even be shared in binary form;p.

The reason why we even have gamepad related problems for soo long is because there are practically no contributors from the affected platforms that would care to improve things, that's really all there is to it ~ open source + lazy community;].

@unknownbrackets
Copy link
Collaborator

This is Android - not using SDL.

pad1.00? means the keyCode is 0. Which makes sense, given this snippet:

else if (context.isServal && event.getKeyCode() == KeyEvent.KEYCODE_UNKNOWN) {
        switch (event.getScanCode())  {

So basically, it needs us to pay attention to event.getScanCode() for UNKNOWN keys.

-[Unknown]

@LunaMoo
Copy link
Collaborator

LunaMoo commented Dec 2, 2017

Sorry then, always assumed PPSSPP uses SDL everywhere outside of windows.
It definitely exists on android, then again it also exists for windows;p.

@hrydgard hrydgard modified the milestones: v1.6.0, v1.7.0 Mar 24, 2018
@swatwithmk3
Copy link

Did you guys find any solution because this issue is not only restricted to one app but all, I even tried a game on my shield tv (Tomb Raider Android version) and the buttons don't work. I tested it with game controller mapper and both work but both are 0.

@hrydgard hrydgard modified the milestones: v1.7.0, v1.8.0 Sep 16, 2018
@hrydgard hrydgard modified the milestones: v1.8.0, v1.9.0 Feb 8, 2019
@hrydgard hrydgard modified the milestones: v1.9.0, v1.10.0 Jun 27, 2019
@hrydgard hrydgard modified the milestones: v1.10.0, Future Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants