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
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