mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-01 17:44:35 +00:00
Fixed setting fullscreen mode on iOS
Needed to update the actual window flags based on the requested state (@Kontrabant)
This commit is contained in:
@@ -305,6 +305,11 @@ static void UIKit_UpdateWindowBorder(SDL_VideoDevice *_this, SDL_Window *window)
|
||||
void UIKit_SetWindowBordered(SDL_VideoDevice *_this, SDL_Window *window, SDL_bool bordered)
|
||||
{
|
||||
@autoreleasepool {
|
||||
if (bordered) {
|
||||
window->flags &= ~SDL_WINDOW_BORDERLESS;
|
||||
} else {
|
||||
window->flags |= SDL_WINDOW_BORDERLESS;
|
||||
}
|
||||
UIKit_UpdateWindowBorder(_this, window);
|
||||
}
|
||||
}
|
||||
@@ -312,6 +317,11 @@ void UIKit_SetWindowBordered(SDL_VideoDevice *_this, SDL_Window *window, SDL_boo
|
||||
int UIKit_SetWindowFullscreen(SDL_VideoDevice *_this, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen)
|
||||
{
|
||||
@autoreleasepool {
|
||||
if (fullscreen) {
|
||||
window->flags &= ~SDL_WINDOW_FULLSCREEN;
|
||||
} else {
|
||||
window->flags |= SDL_WINDOW_FULLSCREEN;
|
||||
}
|
||||
UIKit_UpdateWindowBorder(_this, window);
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user