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

Summary: [Patch] SDL_ShowMessageBox ignores BUTTON_RETURNKEY_DEFAULT flag
Product: SDL Reporter: Caleb Cornett <spydog>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2    
Version: 2.0.10   
Hardware: iPhone/iPod touch   
OS: iOS 11   
Attachments: Patch for the described issue

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