Merge pull request #6589 from misl6/fix-ios-fullscreen

Add the ability to show statusbar on iOS
This commit is contained in:
Gabriel Pettier 2019-12-24 15:46:05 +01:00 committed by GitHub
commit 38fcbd5b90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 13 deletions

View File

@ -77,11 +77,10 @@ cdef class _WindowSDL2Storage:
resizable, state, gl_backend): resizable, state, gl_backend):
self.win_flags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI self.win_flags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI
if USE_IOS:
self.win_flags |= SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE | SDL_WINDOW_FULLSCREEN_DESKTOP
else:
if resizable: if resizable:
self.win_flags |= SDL_WINDOW_RESIZABLE self.win_flags |= SDL_WINDOW_RESIZABLE
if not USE_IOS:
if borderless: if borderless:
self.win_flags |= SDL_WINDOW_BORDERLESS self.win_flags |= SDL_WINDOW_BORDERLESS
@ -90,6 +89,9 @@ cdef class _WindowSDL2Storage:
# the same fullscreen setting as AndroidManifest.xml. # the same fullscreen setting as AndroidManifest.xml.
if environ.get('P4A_IS_WINDOWED', 'True') == 'False': if environ.get('P4A_IS_WINDOWED', 'True') == 'False':
self.win_flags |= SDL_WINDOW_FULLSCREEN self.win_flags |= SDL_WINDOW_FULLSCREEN
elif USE_IOS:
if environ.get('IOS_IS_WINDOWED', 'True') == 'False':
self.win_flags |= SDL_WINDOW_FULLSCREEN | SDL_WINDOW_BORDERLESS
elif fullscreen == 'auto': elif fullscreen == 'auto':
self.win_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP self.win_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP
elif fullscreen is True: elif fullscreen is True: