| Summary: | Message Boxes aren't implemented on Android | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ryan C. Gordon <icculus> |
| Component: | video | Assignee: | Gabriel Jacobo <gabomdq> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | amaranth72, philipp.wiesemann |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Other | ||
| Attachments: |
patch for messagebox on Android
patch for messagebox on Android (first fix) patch for messagebox on Android (third version) |
||
Created attachment 1578 [details]
patch for messagebox on Android
I attached a patch for an incomplete implementation of the messagebox parts.
It was not tested on lots of devices yet and features a very fragile workaround to block the calling SDL thread while the dialog is handled on Android's UI thread. Although it works for testmessage.c I assume there are lot of situations were it may fail (standby, device rotation and other changes). Also not all flags and colors are implemented.
On the other hand most uses of the messagebox are to show an error on start and fragility (or working at all) may not matter there.
Thanks Philipp, I'll give this a try and let you know if I manage to break it. Created attachment 1580 [details]
patch for messagebox on Android (first fix)
I updated the patch because of a JNI reference leak and dialogs not being canceled correctly.
Created attachment 1867 [details]
patch for messagebox on Android (third version)
I attached a new version of the patch because the old did not apply without conflicts. Also the button flags are now implemented.
Looks good, thanks! https://hg.libsdl.org/SDL/rev/6cd8e6b54f4d |
As noted here... http://lists.libsdl.org/pipermail/sdl-libsdl.org/2014-February/093338.html ...we don't have message boxes on Android at all. What would fixing this take? Surely there's some system-supplied popup thing? --ryan.