We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4747 - [Patch] SDL_ShowMessageBox ignores BUTTON_RETURNKEY_DEFAULT flag
Summary: [Patch] SDL_ShowMessageBox ignores BUTTON_RETURNKEY_DEFAULT flag
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.10
Hardware: iPhone/iPod touch iOS 11
: P2 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-01 02:46 UTC by Caleb Cornett
Modified: 2019-08-06 06:52 UTC (History)
0 users

See Also:


Attachments
Patch for the described issue (548 bytes, patch)
2019-08-01 02:46 UTC, Caleb Cornett
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Caleb Cornett 2019-08-01 02:46:52 UTC
Created attachment 3916 [details]
Patch for the described issue

SDL_ShowMessageBox on UIKit doesn't do anything special with buttons that are marked with the flag SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT. According to Apple's documentation on UIAlertController, a button can respond to a return key if it's marked as the preferredAction of the controller. SDL doesn't set a preferredAction currently, so I've attached a patch to fix that.
Comment 1 Sam Lantinga 2019-08-06 06:52:36 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/4436f8e76e5c