显示页码的逻辑出现了延迟,修改到同步了

This commit is contained in:
anod 2022-10-16 10:22:34 +08:00
parent a241866a8d
commit e8c98d6d02

View File

@ -78,7 +78,7 @@ const char *acf_put_text(int x, int y, int width, int height, int maxwidth, u8 c
static void screen_clean()
{
memset(consoleGet()->frameBuffer, 0xff, WINDOW_WIDTH*WINDOW_HEIGHT*sizeof(uint16_t));
memset(consoleGet()->frameBuffer, 0, WINDOW_WIDTH*WINDOW_HEIGHT*sizeof(uint16_t));
if( ta[0] ) acf_put_text( 5, 215, WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_WIDTH-10, ATP_COLOR_CYAN, ATP_PLACEMENT_LEFT, ta );
if( tb[0] ) acf_put_text( 5, 215, WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_WIDTH-10, ATP_COLOR_CYAN, ATP_PLACEMENT_RIGHT, tb );
}
@ -186,14 +186,14 @@ static atp_error_t title_paint( atp_callerdata_t datain, atp_counter_t idx, atp_
#define PAGING_BUFSIZE 32
static void set_paging( int top, int len )
{
screen_clean();
unsigned total = (len+CONTAINER_MAX_LINES-1) / CONTAINER_MAX_LINES;
unsigned current = top / CONTAINER_MAX_LINES;
char buf[PAGING_BUFSIZE+1];
ee_snprintf( buf, PAGING_BUFSIZE, "页码:%d/%d", top, len );
buf[PAGING_BUFSIZE] = '\0';
atp_tips( buf, NULL );
screen_clean();
}
static void draw_one_option( int index, int selected, int row, atp_itemprovider_t provider, atp_callerdata_t data )