| Summary: | SDL sets an error for the initial touch on Android. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Philipp Wiesemann <philipp.wiesemann> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Android (All) | ||
| Attachments: | patch for SDL setting error for initial touch on Android | ||
Fixed, thanks! http://hg.libsdl.org/SDL/rev/fb7b426ab660 |
Created attachment 1095 [details] patch for SDL setting error for initial touch on Android SDL sets an error to be queried with SDL_GetError() for the initial touch on Android. Android_OnTouch() in SDL_androidtouch.c uses SDL_GetTouch() to check if a touch device was already added. SDL_GetTouch() sets the error "Unknown touch device" for an out of range access because touch devices are added after initial touch. I think this error is confusing because it always happens by design. I attached a patch which removes the call to SDL_GetTouch() and only uses SDL_AddTouch() which does the check (if already added) again and does not set an error (if not added yet).