Skip to content

Commit f9e959f

Browse files
authored
Merge pull request #2 from goweiwen/fix-menu-clear-borders
Fix menu not cleared outside content area
2 parents e800ff8 + 7e16927 commit f9e959f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/gfx/drivers/miyoomini/sdl_miyoomini_gfx.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,7 @@ static bool sdl_miyoomini_gfx_frame(void *data, const void *frame,
938938
if (unlikely(vid->was_in_menu)) {
939939
sdl_miyoomini_clear_border(fb_addr, vid->video_x, vid->video_y, vid->video_w, vid->video_h);
940940
vid->was_in_menu = false;
941+
stOpt.eRotate = vid->rotate;
941942
}
942943
/* Update video mode if width/height have changed */
943944
if (unlikely( (vid->content_width != width ) ||
@@ -951,10 +952,12 @@ static bool sdl_miyoomini_gfx_frame(void *data, const void *frame,
951952
/* HW Blit GFX surface to Framebuffer and Flip */
952953
GFX_UpdateRect(vid->screen, vid->video_x, vid->video_y, vid->video_w, vid->video_h);
953954
} else {
955+
if (!vid->was_in_menu) {
956+
vid->was_in_menu = true;
957+
stOpt.eRotate = E_MI_GFX_ROTATE_180;
958+
}
954959
SDL_SoftStretch(vid->menuscreen_rgui, NULL, vid->menuscreen, rgui_menu_stretch ? NULL : &rgui_menu_dest_rect);
955-
stOpt.eRotate = E_MI_GFX_ROTATE_180;
956960
GFX_Flip(vid->menuscreen);
957-
stOpt.eRotate = vid->rotate;
958961
}
959962
return true;
960963
}

0 commit comments

Comments
 (0)