Dolphin, the GameCube and Wii emulator - Forums
Gamepad doesn't work on ChromeOS [includes fix] - Printable Version

+- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org)
+-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support)
+--- Forum: Android (https://forums.dolphin-emu.org/Forum-android)
+--- Thread: Gamepad doesn't work on ChromeOS [includes fix] (/Thread-gamepad-doesn-t-work-on-chromeos-includes-fix)



Gamepad doesn't work on ChromeOS [includes fix] - ExceptionStock - 03-30-2019

Hello. When running on ChromeOS through Android subsystem the GamePad doesn't work. 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. Could somebody please fix this? I can't for some contract reasons


RE: Gamepad doesn't work on ChromeOS [includes fix] - Billiard26 - 04-03-2019

This information would get more attention if you made an issue report. https://bugs.dolphin-emu.org/projects/emulator/issues


RE: Gamepad doesn't work on ChromeOS [includes fix] - ExceptionStock - 04-06-2019

Thank you, filed here: https://bugs.dolphin-emu.org/issues/11662


RE: Gamepad doesn't work on ChromeOS [includes fix] - LazerTag - 04-24-2019

+1 from another Chrome OS user here. Would love to see this fix get coded in. Thanks for reporting this so clearly ExceptionStock!