Emulator Issues #11662

Gamepad doesn't work on ChromeOS [includes fix]

Added by ExceptionStock over 1 year ago. Updated 6 months ago.

% Done:


Operating system:
Issue type:
Relates to usability:
Relates to performance:
Relates to maintainability:
Regression start:
Fixed in:


Game Name?

Game-independent but I tried with Super Mario Sunshine

What's the problem? Describe what went wrong.

When using Android version on ChromeOS GamePad can be configured but in the game no reaction to button presses

What steps will reproduce the problem?

  1. Get a Chromebook with Android apps support and a bluetooth gamepad
  2. Install Dolphin from Play Store
  3. Add any game
  4. Go to config and bind the buttons to a bluetooth gamepad
  5. Start a game
  6. Press any buttons on gamepad

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.


Is the issue present in the latest stable version?


What are your PC specifications? (CPU, GPU, Operating System, more)


Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

The issue comes from the fact that getDescriptor on ChromeOS returns "" for gamepad which is actually within the specs as the speconly guarantees the stability of ID, and "" is a valid ID. Then in Source/Android/jni/ButtonManager.cpp we have lines like:
sscanf(value.c_str(), "Device '%127[\']'-Axis %d%c", dev, &bindnum, &modifier);
Unfortunately %127[\'] doesn't accept empty string, so you need something like:
if (value.find(""Device ''") == 0) {
dev[0] = '\0';
sscanf(value.c_str(), "Device ''-Axis %d%c", &bindnum, &modifier);
} else {
sscanf(value.c_str(), "Device '%127[\']'-Axis %d%c", dev, &bindnum, &modifier);
This needs to be modified in 4 places in Source/Android/jni/ButtonManager.cpp: 2 time with -Button and 2 times wit -Axis.
With this changes gamepad and Dolphin work perfectly on ChromeOS.


#1 Updated by Techjar over 1 year ago

It would be much easier if you actually submit a PR on GitHub.

#2 Updated by ExceptionStock over 1 year ago

True but it's tricky for me to get my organization's approval to share my code, so I had to opt for describing the issue in detail instead

#3 Updated by delroth over 1 year ago

IARC is usually painless for contributing to emulator projects, I'd give it a shot. (You can find me on moma.)

#4 Updated by LazerTag about 1 year ago

I apologize if this isn't the place, but this bug is the one thing keeping Chromebook users from being able to play with Dolphin using a real controller. Any chance of this getting prioritized soon for a future release? Thanks for your time.

#5 Updated by LazerTag 10 months ago

ExceptionStock wrote:

True but it's tricky for me to get my organization's approval to share my code, so I had to opt for describing the issue in detail instead

Many months later it seems like we might never see this fix :( I get it there simply are not enough of us Chromebook users out there but literally tens of us would be super excited to get this fixed in Dolphin :)

@ExceptionStock if you see this, is there anyway you can get this in there? I work as a sysAdmin at a software developer so I get how hard it might be to get this passed your agreement with your company. Just know until you or someone feels interested in picking this up Dolphin just is not much fun for us non-coders. thanks for the ear on the subject and I'll just leave it at that.

#6 Updated by Billiard26 10 months ago

  • Status changed from New to Work started

A fix is already in the works:

#7 Updated by LazerTag 10 months ago

Billiard26 wrote:

A fix is already in the works:

Hi, last reply I will make here so as not to bug anyone further. This is really great news for Chromebook users, ty! I'll just follow it from github link you provided.

#8 Updated by JosJuice 6 months ago

  • Fixed in set to 5.0-11617
  • Status changed from Work started to Fixed
  • Operating system Android added
  • Operating system deleted (N/A)

Also available in: Atom PDF