Skip to content

Commit

Permalink
Fixed bug causing full-window mode to always show as windowed
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Sep 18, 2021
1 parent 8a7b319 commit fd95c63
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/osdep/amiberry_gfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,6 @@ void update_win_fs_mode(int monid, struct uae_prefs* p)
const auto window_flags = SDL_GetWindowFlags(mon->sdl_window);
const bool is_fullwindow = window_flags & SDL_WINDOW_FULLSCREEN_DESKTOP;
const bool is_fullscreen = window_flags & SDL_WINDOW_FULLSCREEN;
const bool is_maximized = window_flags & SDL_WINDOW_MAXIMIZED;

if (p->gfx_apmode[0].gfx_fullscreen == GFX_FULLSCREEN)
{
Expand All @@ -585,12 +584,9 @@ void update_win_fs_mode(int monid, struct uae_prefs* p)
else
{
p->gfx_monitor[0].gfx_size = p->gfx_monitor[0].gfx_size_win;
}

if (!is_maximized)
{
// Switch to Window mode, if we don't have it already - but not for KMSDRM
if ((is_fullscreen || is_fullwindow) && strcmpi(sdl_video_driver, "KMSDRM") != 0)
if ((is_fullscreen || is_fullwindow)
&& strcmpi(sdl_video_driver, "KMSDRM") != 0)
SDL_SetWindowFullscreen(mon->sdl_window, 0);
}

Expand Down

0 comments on commit fd95c63

Please sign in to comment.