summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-03-22 17:34:46 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2022-03-22 17:55:23 -0400
commit822b16b1c6d7b406981ab7177b784479cd37e1a6 (patch)
treee71f9236d9182f2b2c3856a6756ed5f4ddf243b6
parent7910f4a7aa0d713286c63b42c39973c188ea961f (diff)
downloadrockbox-822b16b1c6d7b406981ab7177b784479cd37e1a6.tar.gz
rockbox-822b16b1c6d7b406981ab7177b784479cd37e1a6.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.c21
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,
173 threadinfo.name); 173 threadinfo.name);
174 174
175 int start = 0; 175 int start = 0;
176#if LCD_WIDTH <= 128
176 if (len >= SCREEN_MAX_CHARS) 177 if (len >= SCREEN_MAX_CHARS)
177 { 178 {
178 int ch_offset = (*x_offset)%(len-1); 179 int ch_offset = (*x_offset)%(len-1);
@@ -189,6 +190,10 @@ static const char* threads_getname(int selected_item, void *data,
189 start = ch_offset; 190 start = ch_offset;
190 } 191 }
191 } 192 }
193#else
194 (void) x_offset;
195 (void) len;
196#endif
192 return &buffer[start]; 197 return &buffer[start];
193} 198}
194 199
@@ -199,7 +204,7 @@ static int dbg_threads_action_callback(int action, struct gui_synclist *lists)
199 { 204 {
200 return ACTION_REDRAW; 205 return ACTION_REDRAW;
201 } 206 }
202 207#if LCD_WIDTH <= 128
203 int *x_offset = ((int*) lists->data); 208 int *x_offset = ((int*) lists->data);
204 if (action == ACTION_STD_OK) 209 if (action == ACTION_STD_OK)
205 { 210 {
@@ -210,7 +215,9 @@ static int dbg_threads_action_callback(int action, struct gui_synclist *lists)
210 { 215 {
211 *x_offset = 0; 216 *x_offset = 0;
212 } 217 }
213 218#else
219 (void) lists;
220#endif
214 return action; 221 return action;
215} 222}
216/* Test code!!! */ 223/* Test code!!! */
@@ -370,7 +377,14 @@ static bool dbg_buffering_thread(void)
370 struct buffering_debug d; 377 struct buffering_debug d;
371 size_t filebuflen = audio_get_filebuflen(); 378 size_t filebuflen = audio_get_filebuflen();
372 /* This is a size_t, but call it a long so it puts a - when it's bad. */ 379 /* This is a size_t, but call it a long so it puts a - when it's bad. */
380#if LCD_WIDTH > 96
381 #define STR_DATAREM "data_rem"
373 const char * const fmt_used = "%s: %6ld/%ld"; 382 const char * const fmt_used = "%s: %6ld/%ld";
383#else /* clipzip, ?*/
384 #define STR_DATAREM "remain"
385 const char * const fmt_used = "%s:%ld/%ld";
386#endif
387
374#ifndef CPU_MULTI_FREQUENCY 388#ifndef CPU_MULTI_FREQUENCY
375 boost_ticks = 0; 389 boost_ticks = 0;
376#endif 390#endif
@@ -443,7 +457,7 @@ static bool dbg_buffering_thread(void)
443 } 457 }
444#endif 458#endif
445 459
446 screens[i].putsf(0, line++, "data_rem: %ld", (long)d.data_rem); 460 screens[i].putsf(0, line++, "%s: %ld", STR_DATAREM, (long)d.data_rem);
447 461
448 screens[i].putsf(0, line++, "track count: %2u", audio_track_count()); 462 screens[i].putsf(0, line++, "track count: %2u", audio_track_count());
449 463
@@ -482,6 +496,7 @@ static bool dbg_buffering_thread(void)
482 screens[i].setfont(FONT_UI); 496 screens[i].setfont(FONT_UI);
483 497
484 return false; 498 return false;
499#undef STR_DATAREM
485} 500}
486 501
487static const char* bf_getname(int selected_item, void *data, 502static const char* bf_getname(int selected_item, void *data,