From: DeaDDooMER Date: Wed, 1 Apr 2020 11:26:44 +0000 (+0400) Subject: sdl: fix videomode flags on fullscreen toggle X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=fcf91b33fd6968628c8f22b1c9af378985ab69a8;p=flatwaifu.git sdl: fix videomode flags on fullscreen toggle --- diff --git a/src/sdl/main.c b/src/sdl/main.c index 07dccf9..df880c4 100644 --- a/src/sdl/main.c +++ b/src/sdl/main.c @@ -137,9 +137,12 @@ void Y_unset_videomode (void) { void Y_set_fullscreen (int yes) { assert(surf != NULL); - Uint32 flags = surf->flags & ~SDL_FULLSCREEN; + int flags = 0; if ((surf->flags & SDL_FULLSCREEN) == 0) { - flags |= SDL_FULLSCREEN; + flags |= SYSTEM_USE_FULLSCREEN; + } + if (surf->flags & SDL_OPENGL) { + flags |= SDL_OPENGL; } Y_set_videomode(surf->w, surf->h, flags); }