1
0
Fork 0
forked from len0rd/rockbox

[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
This commit is contained in:
William Wilgus 2024-12-16 01:29:05 -05:00 committed by William Wilgus
parent 15b18e478c
commit 33c0c9efae
2 changed files with 24 additions and 2 deletions

View file

@ -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);

View file

@ -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;
}