1
0
Fork 0
forked from len0rd/rockbox

[Bugfix] Copy current lcd contents into empty background buffers

the manual states the following:
%V(0,0,-,-,-) %VB
Use %x(filename, 0, 0) to draw a backdrop image (If you want one!)
Then add %V(0,0,-,-,-)

if you forget then it causes display corruption
due to the uninitialized background buffer

instead make a copy of the current screen into the blank backdrop
so we won't be showing garbled data on the screen

Change-Id: I3f0df131d36537e91688e104c9445a604f657362
This commit is contained in:
William Wilgus 2025-01-05 22:09:48 -05:00 committed by William Wilgus
parent 907c91997e
commit 0b5f1b68e6

View file

@ -203,7 +203,24 @@ bool skin_backdrops_preload(void)
}
}
else
{
backdrops[i].loaded = true;
/* Bugfix themes which don't use %VB properly */
extern struct frame_buffer_t lcd_framebuffer_default;
#if defined(HAVE_REMOTE_LCD) /* HAVE_REMOTE_LCD */
extern struct frame_buffer_t lcd_remote_framebuffer_default;
if (screen == SCREEN_REMOTE)
{
memcpy(backdrops[i].buffer,
lcd_remote_framebuffer_default.data, REMOTE_LCD_BACKDROP_BYTES);
}
else
#endif
{
memcpy(backdrops[i].buffer,
lcd_framebuffer_default.data, LCD_BACKDROP_BYTES);
}
}
}
else
retval = false;