summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 63e7a3b9d9..295a32f16d 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -431,6 +431,7 @@ static const struct bit_entry hd_bits[] =
431 {1, S_O(replaygain), false, "replaygain", off_on }, 431 {1, S_O(replaygain), false, "replaygain", off_on },
432 {1, S_O(replaygain_track), false, "replaygain type", "track,album" }, 432 {1, S_O(replaygain_track), false, "replaygain type", "track,album" },
433 {1, S_O(replaygain_noclip), false, "replaygain noclip", off_on }, 433 {1, S_O(replaygain_noclip), false, "replaygain noclip", off_on },
434 {8, S_O(replaygain_preamp), 0, "replaygain preamp", NULL },
434#endif 435#endif
435 436
436 /* If values are just added to the end, no need to bump the version. */ 437 /* If values are just added to the end, no need to bump the version. */
@@ -1388,7 +1389,8 @@ bool set_int(const char* string,
1388 void (*function)(int), 1389 void (*function)(int),
1389 int step, 1390 int step,
1390 int min, 1391 int min,
1391 int max ) 1392 int max,
1393 void (*formatter)(char*, int, int, const char*) )
1392{ 1394{
1393 bool done = false; 1395 bool done = false;
1394 int button; 1396 int button;
@@ -1407,7 +1409,16 @@ bool set_int(const char* string,
1407 1409
1408 while (!done) { 1410 while (!done) {
1409 char str[32]; 1411 char str[32];
1410 snprintf(str,sizeof str,"%d %s ", *variable, unit); 1412
1413 if (formatter)
1414 {
1415 formatter(str, sizeof str, *variable, unit);
1416 }
1417 else
1418 {
1419 snprintf(str,sizeof str,"%d %s ", *variable, unit);
1420 }
1421
1411 lcd_puts(0, 1, str); 1422 lcd_puts(0, 1, str);
1412#ifdef HAVE_LCD_BITMAP 1423#ifdef HAVE_LCD_BITMAP
1413 status_draw(true); 1424 status_draw(true);