mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-11 13:26:34 +00:00
recache RGUI background when framebuffer changes size
This commit is contained in:
parent
6416f825ed
commit
f2f636ca19
@ -55,6 +55,8 @@
|
||||
typedef struct {
|
||||
bool force_redraw;
|
||||
char msgbox[4096];
|
||||
unsigned last_width;
|
||||
unsigned last_height;
|
||||
} rgui_t;
|
||||
|
||||
static INLINE uint16_t argb32_to_rgba4444(uint32_t col)
|
||||
@ -404,6 +406,16 @@ static void rgui_render(void)
|
||||
return;
|
||||
}
|
||||
|
||||
// if the framebuffer changed size, recache the background
|
||||
if (rgui->last_width != frame_buf->width || rgui->last_height != frame_buf->height)
|
||||
{
|
||||
fill_rect(frame_buf, 0, frame_buf->height,
|
||||
frame_buf->width, 4, gray_filler);
|
||||
rgui->last_width = frame_buf->width;
|
||||
rgui->last_height = frame_buf->height;
|
||||
}
|
||||
|
||||
|
||||
/* ensures the framebuffer will be rendered on the screen */
|
||||
menu_display_fb_set_dirty();
|
||||
anim->is_active = false;
|
||||
@ -609,6 +621,9 @@ static void *rgui_init(void)
|
||||
fill_rect(frame_buf, 0, frame_buf->height,
|
||||
frame_buf->width, 4, gray_filler);
|
||||
|
||||
rgui->last_width = frame_buf->width;
|
||||
rgui->last_height = frame_buf->height;
|
||||
|
||||
return menu;
|
||||
|
||||
error:
|
||||
|
Loading…
x
Reference in New Issue
Block a user