| Summary: | Android: SDL_QUIT event not generated on back key press | ||
|---|---|---|---|
| Product: | SDL | Reporter: | tower120 |
| Component: | events | Assignee: | Sylvain <sylvain.becker> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sylvain.becker, tower120 |
| Version: | 2.0.5 | ||
| Hardware: | ARM | ||
| OS: | Android (All) | ||
| Attachments: | patch | ||
|
Description
tower120
2016-12-07 21:46:49 UTC
you have a SDL_QUIT event when the java onDestroy is called. It calls nativeQuit, which fires SDL_QUIT event. When you press the back button you get a key SDL_AC_BACK. Well, maybe it would be good to see that explanation in the manual... Because I didn't saw a single tutorial/example where instead SDL_QUIT, SDL_KEYUP + SDL_AC_BACK processed. NativeApplication, for example closes by default by back button. Sylvain, what's the expected Android behavior here? According to https://developer.android.com/design/patterns/navigation.html the smartphone back button is for the navigation. In SDL this is correctly mapped to a SDL_KEYDOWN/UP with keycode SDLK_AC_BACK. So behavior is as expected. Maybe some documentation in the include file : "SDL_keycode.h" ? Or, maybe some android specific doc ? Created attachment 3076 [details]
patch
Patch with some android-documentation to end an application.
please check that end-of-line CR/LF are correct, because the patch seems to contain something different. Add some documentation and marked as resolved https://hg.libsdl.org/SDL/rev/b2422f30f0a6 |