summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-12-16 01:29:05 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2024-12-16 11:37:56 -0500
commit33c0c9efae4ea436c1fb1e15302b0b3b010b7397 (patch)
tree2e0f673733907db2b1a27b2ff83a50d3d7d64517
parent15b18e478cff8503a5976f4e56db28b1e4dff819 (diff)
downloadrockbox-33c0c9efae.tar.gz
rockbox-33c0c9efae.zip
[Bugfix] Simulator doesn't scroll lists in plugins
unless lcd_update() is called the sim doesn't update scrolling you CANNOT call it from the scroll thread its simply ignored I suspect this has something to do with where the call to render originates as thi is the only thing I can think of besides a call to disable the render see demos/rb_info > paths -- observe the lack of scrolling see any menu in a plugin that exceeds screen width Change-Id: Ic14dee4a34de29479d739e6a280d6cf1cc283719
-rw-r--r--apps/gui/list.c21
-rw-r--r--firmware/drivers/lcd-scroll.c5
2 files changed, 24 insertions, 2 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index d974470a26..6a8d5ef4d3 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -18,7 +18,6 @@
* KIND, either express or implied.
*
****************************************************************************/
-
#include <stdarg.h>
#include <stdio.h>
#include "config.h"
@@ -659,6 +658,26 @@ bool gui_synclist_do_button(struct gui_synclist * lists, int *actionptr)
gui_synclist_draw(lists);
return true;
+#ifdef SIMULATOR /* BUGFIX sim doesn't scroll lists from other threads */
+ case ACTION_NONE:
+ {
+ extern struct scroll_screen_info lcd_scroll_info;
+ struct scroll_screen_info *si = &lcd_scroll_info;
+
+ for (int index = 0; index < si->lines; index++)
+ {
+ struct scrollinfo *s = &si->scroll[index];
+ if (s->vp && (s->vp->flags & VP_FLAG_VP_DIRTY))
+ {
+ s->vp->flags &= ~VP_FLAG_VP_SET_CLEAN;
+ lcd_update_viewport_rect(s->x, s->y, s->width, s->height);
+ }
+ }
+
+ break;
+ }
+#endif
+
#ifdef HAVE_VOLUME_IN_LIST
case ACTION_LIST_VOLUP:
adjust_volume(1);
diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c
index 2a58d6ff21..7c5492e983 100644
--- a/firmware/drivers/lcd-scroll.c
+++ b/firmware/drivers/lcd-scroll.c
@@ -224,8 +224,11 @@ static void LCDFN(scroll_worker)(void)
/* put the line onto the display now */
makedelay = LCDFN(scroll_now(s));
+#ifdef SIMULATOR /* Bugfix sim won't update screen unless called from active thread */
+ LCDFN(set_viewport)(oldvp);
+#else
LCDFN(set_viewport_ex)(oldvp, 0); /* don't mark the last vp as dirty */
-
+#endif
if (makedelay)
s->start_tick += si->delay + si->ticks;
}