diff options
author | William Wilgus <wilgus.william@gmail.com> | 2025-01-05 22:09:48 -0500 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2025-01-06 02:26:11 -0500 |
commit | 0b5f1b68e6c52c6a86d199d8608e40e03d7dbbff (patch) | |
tree | 1288d8f7742549e7f9aac8ccf31ab1a94065604a | |
parent | 907c91997ed0dbf63a9df021cdd1918df1c0d924 (diff) | |
download | rockbox-0b5f1b68e6.tar.gz rockbox-0b5f1b68e6.zip |
[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
-rw-r--r-- | apps/gui/skin_engine/skin_backdrops.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_backdrops.c b/apps/gui/skin_engine/skin_backdrops.c index 08937d8fdc..994640c1fb 100644 --- a/apps/gui/skin_engine/skin_backdrops.c +++ b/apps/gui/skin_engine/skin_backdrops.c @@ -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; |