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 4658

Summary: [Patch] iOS 12 fullscreen flag and SDL_HINT_IOS_HIDE_HOME_INDICATOR not working
Product: SDL Reporter: Caleb Cornett <spydog>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: flibitijibibo, icculus, sdl-bugzilla
Version: HG 2.0Keywords: target-2.0.10
Hardware: iPhone/iPod touch   
OS: iOS 11   
Attachments: Patch file

Description Caleb Cornett 2019-06-08 04:04:16 UTC
Created attachment 3808 [details]
Patch file

On iOS 12, creating a window with the SDL_WINDOW_FULLSCREEN flag does not dim the home indicator or defer system gestures. The same goes for setting the SDL_HINT_IOS_HIDE_HOME_INDICATOR to "2" -- it has no effect at all.

I've tracked down the source of this misbehavior to a timing issue. The initial `setNeedsUpdate...` calls were happening too early and getting applied to the launch screen by mistake. In the attached patch, I've added a call to those functions right after the launch screen is hidden so that they apply to the main view controller instead. This appears to fix the issue, at least on my iPhone 6s Plus.
Comment 1 Dominik Reichardt 2019-06-09 13:07:50 UTC
*** Bug 4661 has been marked as a duplicate of this bug. ***
Comment 2 Dominik Reichardt 2019-06-09 13:20:10 UTC
I can confirm that this works nicely in Exult for iOS as well, tested on the iOS simulator.
Comment 3 Sam Lantinga 2019-06-09 21:09:00 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/9b59bc963a74