diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-03-22 17:34:46 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-03-22 17:55:23 -0400 |
commit | 822b16b1c6d7b406981ab7177b784479cd37e1a6 (patch) | |
tree | e71f9236d9182f2b2c3856a6756ed5f4ddf243b6 | |
parent | 7910f4a7aa0d713286c63b42c39973c188ea961f (diff) | |
download | rockbox-822b16b1c6.tar.gz rockbox-822b16b1c6.zip |
debug_menu dbg_buffering_thread show more on tiny screens
I think the clipzip has the smallest screen at 96
might need to be enabled for LCD_WIDTH <=128 too
remove scrolling thread info for larger screens
Change-Id: Ic98c9fc0b53f79e90776c13429194f9c37c1d48b
-rw-r--r-- | apps/debug_menu.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 43c74bfa28..9f973e6146 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -173,6 +173,7 @@ static const char* threads_getname(int selected_item, void *data, threadinfo.name); int start = 0; +#if LCD_WIDTH <= 128 if (len >= SCREEN_MAX_CHARS) { int ch_offset = (*x_offset)%(len-1); @@ -189,6 +190,10 @@ static const char* threads_getname(int selected_item, void *data, start = ch_offset; } } +#else + (void) x_offset; + (void) len; +#endif return &buffer[start]; } @@ -199,7 +204,7 @@ static int dbg_threads_action_callback(int action, struct gui_synclist *lists) { return ACTION_REDRAW; } - +#if LCD_WIDTH <= 128 int *x_offset = ((int*) lists->data); if (action == ACTION_STD_OK) { @@ -210,7 +215,9 @@ static int dbg_threads_action_callback(int action, struct gui_synclist *lists) { *x_offset = 0; } - +#else + (void) lists; +#endif return action; } /* Test code!!! */ @@ -370,7 +377,14 @@ static bool dbg_buffering_thread(void) struct buffering_debug d; size_t filebuflen = audio_get_filebuflen(); /* This is a size_t, but call it a long so it puts a - when it's bad. */ +#if LCD_WIDTH > 96 + #define STR_DATAREM "data_rem" const char * const fmt_used = "%s: %6ld/%ld"; +#else /* clipzip, ?*/ + #define STR_DATAREM "remain" + const char * const fmt_used = "%s:%ld/%ld"; +#endif + #ifndef CPU_MULTI_FREQUENCY boost_ticks = 0; #endif @@ -443,7 +457,7 @@ static bool dbg_buffering_thread(void) } #endif - screens[i].putsf(0, line++, "data_rem: %ld", (long)d.data_rem); + screens[i].putsf(0, line++, "%s: %ld", STR_DATAREM, (long)d.data_rem); screens[i].putsf(0, line++, "track count: %2u", audio_track_count()); @@ -482,6 +496,7 @@ static bool dbg_buffering_thread(void) screens[i].setfont(FONT_UI); return false; +#undef STR_DATAREM } static const char* bf_getname(int selected_item, void *data, |