Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don't use CHECK_VOL(x) as a loop conditional

...On non-multidrive targets it will always evaluate to true because
it effectively ignores the argument passed in.

Instead use 'x < NUM_VOLUMES'

Fixes regression introduced with a41a001258 on non-multivolume devices

Change-Id: I1a620af113c87cf3227ef8b40d0b51b2600cd816

+3 -3
+3 -3
apps/menus/main_menu.c
··· 172 172 int special = 0; 173 173 #endif 174 174 int drive = 0; 175 - for (i = 0 ; CHECK_VOL(i) ; i++) 175 + for (i = 0 ; i < NUM_VOLUMES ; i++) 176 176 #endif 177 177 { 178 178 volume_size(IF_MV(i,) &info->size[i], &info->free[i]); ··· 353 353 info->new_data = true; 354 354 splash(0, ID2P(LANG_SCANNING_DISK)); 355 355 #if (CONFIG_PLATFORM & PLATFORM_NATIVE) 356 - for (int i = 0; CHECK_VOL(i); i++) 356 + for (int i = 0; i < NUM_VOLUMES; i++) 357 357 volume_recalc_free(IF_MV(i)); 358 358 #endif 359 359 gui_synclist_speak_item(lists); ··· 438 438 } 439 439 #endif 440 440 /* INFO_DISK, capacity/free on internal */ 441 - for (int i = 0; CHECK_VOL(i) ; i++) { 441 + for (int i = 0; i < NUM_VOLUMES ; i++) { 442 442 if (info->size[i]) { 443 443 output_dyn_value(s1, sizeof s1, info->free[i], kibyte_units, 3, true); 444 444 output_dyn_value(s2, sizeof s2, info->size[i], kibyte_units, 3, true);