| Summary: | Android/OUYA Controller unknown keycodes | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Martin Gerhardy <martin.gerhardy> |
| Component: | joystick | Assignee: | Gabriel Jacobo <gabomdq> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | gabomdq |
| Version: | HG 2.0 | ||
| Hardware: | ARM | ||
| OS: | Android (All) | ||
|
Description
Martin Gerhardy
2013-11-24 10:07:05 UTC
i really wonder why this happens, as they see them handled in keycode_to_SDL but it looks like my actions did not go through Android_OnPadDown/-Up. i added the line __android_log_print(ANDROID_LOG_ERROR,"myown","android pad down %i", keycode); into these functions and don't see any output in the logcat. Can you debug what happens on the Java side? It looks like this is somehow connected with having the xbox 360 controllers connected to the ouya. I wasn't able to debug it further, yet. But as soon as I plug in the xbox controller (getting all 4 slots) and after that the ouya controller. I get weird results. I still get events for not opened joysticks for example. Maybe that is related to the issue that the keys are reported to be unknown. It seems that this can be a side effect of plugging in a controller after initializing the joystick list on the java side. In SDLActivity.java, onKey function, if SDLActivity.getJoyId( event.getDeviceId() ) is -1, the key will be passed to the keyboard code even if it actually is a gamepad event. FWIW, SDL 2.0 supports hot-plug joysticks, so this is something that would be nice if it worked on Android. I think this can be closed now. since the hotplugging support is in, it doesn't happen anymore. |