summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZakk Roberts <midk@rockbox.org>2006-03-28 02:00:35 +0000
committerZakk Roberts <midk@rockbox.org>2006-03-28 02:00:35 +0000
commitf639df3b8ea9873598babf36c0a9b7b0106374c3 (patch)
tree6509db3bb6f040a7a8548aef663131f88ec78b01
parent6382e883e390a3bceaf1bddf3c86c4daa08c011f (diff)
downloadrockbox-f639df3b8ea9873598babf36c0a9b7b0106374c3.tar.gz
rockbox-f639df3b8ea9873598babf36c0a9b7b0106374c3.zip
Clean up the LCD Settings menu for some targets: hide the Contrast and Invert options for color LCDs; the Flip Display option is now only available on supported targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9300 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/settings_menu.c149
-rw-r--r--firmware/export/config-fmrecorder.h3
-rw-r--r--firmware/export/config-h100.h3
-rw-r--r--firmware/export/config-h120.h3
-rw-r--r--firmware/export/config-h300.h3
-rw-r--r--firmware/export/config-ondiofm.h3
-rw-r--r--firmware/export/config-ondiosp.h3
-rw-r--r--firmware/export/config-recorder.h3
-rw-r--r--firmware/export/config-recorderv2.h3
9 files changed, 104 insertions, 69 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index e381a14595..cd423ec934 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -105,7 +105,7 @@ static bool scroll_paginated(void)
105static bool remote_contrast(void) 105static bool remote_contrast(void)
106{ 106{
107 return set_int( str(LANG_CONTRAST), "", UNIT_INT, 107 return set_int( str(LANG_CONTRAST), "", UNIT_INT,
108 &global_settings.remote_contrast, 108 &global_settings.remote_contrast,
109 lcd_remote_set_contrast, 1, MIN_CONTRAST_SETTING, 109 lcd_remote_set_contrast, 1, MIN_CONTRAST_SETTING,
110 MAX_CONTRAST_SETTING, NULL ); 110 MAX_CONTRAST_SETTING, NULL );
111} 111}
@@ -124,7 +124,7 @@ static bool remote_flip_display(void)
124{ 124{
125 bool rc = set_bool( (char *)str(LANG_FLIP_DISPLAY), 125 bool rc = set_bool( (char *)str(LANG_FLIP_DISPLAY),
126 &global_settings.remote_flip_display); 126 &global_settings.remote_flip_display);
127 127
128 lcd_remote_set_flip(global_settings.remote_flip_display); 128 lcd_remote_set_flip(global_settings.remote_flip_display);
129 lcd_remote_update(); 129 lcd_remote_update();
130 130
@@ -136,7 +136,7 @@ static bool remote_reduce_ticking(void)
136{ 136{
137 bool rc = set_bool( str(LANG_REDUCE_TICKING), 137 bool rc = set_bool( str(LANG_REDUCE_TICKING),
138 &global_settings.remote_reduce_ticking); 138 &global_settings.remote_reduce_ticking);
139 139
140 lcd_remote_emireduce(global_settings.remote_reduce_ticking); 140 lcd_remote_emireduce(global_settings.remote_reduce_ticking);
141 141
142 return rc; 142 return rc;
@@ -228,7 +228,7 @@ static bool backlight_fade_out(void)
228static bool brightness(void) 228static bool brightness(void)
229{ 229{
230 return set_int( str(LANG_BRIGHTNESS), "", UNIT_INT, 230 return set_int( str(LANG_BRIGHTNESS), "", UNIT_INT,
231 &global_settings.brightness, 231 &global_settings.brightness,
232 backlight_set_brightness, 1, MIN_BRIGHTNESS_SETTING, 232 backlight_set_brightness, 1, MIN_BRIGHTNESS_SETTING,
233 MAX_BRIGHTNESS_SETTING, NULL ); 233 MAX_BRIGHTNESS_SETTING, NULL );
234} 234}
@@ -261,16 +261,18 @@ static bool remote_caption_backlight(void)
261} 261}
262#endif /* HAVE_REMOTE_LCD */ 262#endif /* HAVE_REMOTE_LCD */
263 263
264#ifndef HAVE_LCD_COLOR
264static bool contrast(void) 265static bool contrast(void)
265{ 266{
266 return set_int( str(LANG_CONTRAST), "", UNIT_INT, 267 return set_int( str(LANG_CONTRAST), "", UNIT_INT,
267 &global_settings.contrast, 268 &global_settings.contrast,
268 lcd_set_contrast, 1, MIN_CONTRAST_SETTING, 269 lcd_set_contrast, 1, MIN_CONTRAST_SETTING,
269 MAX_CONTRAST_SETTING, NULL ); 270 MAX_CONTRAST_SETTING, NULL );
270} 271}
272#endif /* HAVE_LCD_COLOR */
271 273
272#ifdef HAVE_LCD_BITMAP 274#ifdef HAVE_LCD_BITMAP
273 275#ifndef HAVE_LCD_COLOR
274 /** 276 /**
275 * Menu to set LCD Mode (normal/inverse) 277 * Menu to set LCD Mode (normal/inverse)
276 */ 278 */
@@ -283,7 +285,9 @@ static bool invert(void)
283 lcd_set_invert_display); 285 lcd_set_invert_display);
284 return rc; 286 return rc;
285} 287}
288#endif /* HAVE_LCD_COLOR */
286 289
290#ifdef HAVE_LCD_FLIP
287/** 291/**
288 * Menu to turn the display+buttons by 180 degrees 292 * Menu to turn the display+buttons by 180 degrees
289 */ 293 */
@@ -297,6 +301,7 @@ static bool flip_display(void)
297 301
298 return rc; 302 return rc;
299} 303}
304#endif /* HAVE_LCD_FLIP */
300 305
301/** 306/**
302 * Menu to set Line Selector Type (Pointer/Bar) 307 * Menu to set Line Selector Type (Pointer/Bar)
@@ -310,7 +315,7 @@ static bool invert_cursor(void)
310 NULL); 315 NULL);
311} 316}
312 317
313#ifdef HAVE_LCD_COLOR 318#ifdef HAVE_LCD_COLOR
314/** 319/**
315 * Menu to clear the backdrop image 320 * Menu to clear the backdrop image
316 */ 321 */
@@ -352,7 +357,7 @@ static bool reset_color(void)
352{ 357{
353 global_settings.fg_color = LCD_DEFAULT_FG; 358 global_settings.fg_color = LCD_DEFAULT_FG;
354 global_settings.bg_color = LCD_DEFAULT_BG; 359 global_settings.bg_color = LCD_DEFAULT_BG;
355 360
356 screens[SCREEN_MAIN].set_foreground(global_settings.fg_color); 361 screens[SCREEN_MAIN].set_foreground(global_settings.fg_color);
357 screens[SCREEN_MAIN].set_background(global_settings.bg_color); 362 screens[SCREEN_MAIN].set_background(global_settings.bg_color);
358 return false; 363 return false;
@@ -365,10 +370,10 @@ static bool reset_color(void)
365static bool battery_display(void) 370static bool battery_display(void)
366{ 371{
367 static const struct opt_items names[] = { 372 static const struct opt_items names[] = {
368 { STR(LANG_DISPLAY_GRAPHIC) }, 373 { STR(LANG_DISPLAY_GRAPHIC) },
369 { STR(LANG_DISPLAY_NUMERIC) } 374 { STR(LANG_DISPLAY_NUMERIC) }
370 }; 375 };
371 return set_option( str(LANG_BATTERY_DISPLAY), 376 return set_option( str(LANG_BATTERY_DISPLAY),
372 &global_settings.battery_display, INT, names, 2, NULL); 377 &global_settings.battery_display, INT, names, 2, NULL);
373} 378}
374 379
@@ -377,8 +382,8 @@ static bool battery_display(void)
377 */ 382 */
378static bool volume_type(void) 383static bool volume_type(void)
379{ 384{
380 static const struct opt_items names[] = { 385 static const struct opt_items names[] = {
381 { STR(LANG_DISPLAY_GRAPHIC) }, 386 { STR(LANG_DISPLAY_GRAPHIC) },
382 { STR(LANG_DISPLAY_NUMERIC) } 387 { STR(LANG_DISPLAY_NUMERIC) }
383 }; 388 };
384 return set_option( str(LANG_VOLUME_DISPLAY), &global_settings.volume_type, 389 return set_option( str(LANG_VOLUME_DISPLAY), &global_settings.volume_type,
@@ -415,7 +420,7 @@ static bool peak_meter_hold(void) {
415 18, NULL); 420 18, NULL);
416 421
417 peak_meter_init_times(global_settings.peak_meter_release, 422 peak_meter_init_times(global_settings.peak_meter_release,
418 global_settings.peak_meter_hold, 423 global_settings.peak_meter_hold,
419 global_settings.peak_meter_clip_hold); 424 global_settings.peak_meter_clip_hold);
420 425
421 return retval; 426 return retval;
@@ -454,12 +459,12 @@ static bool peak_meter_clip_hold(void) {
454 { "45min" , TALK_ID(45, UNIT_MIN) }, 459 { "45min" , TALK_ID(45, UNIT_MIN) },
455 { "90min" , TALK_ID(90, UNIT_MIN) } 460 { "90min" , TALK_ID(90, UNIT_MIN) }
456 }; 461 };
457 retval = set_option( str(LANG_PM_CLIP_HOLD), 462 retval = set_option( str(LANG_PM_CLIP_HOLD),
458 &global_settings.peak_meter_clip_hold, INT, names, 463 &global_settings.peak_meter_clip_hold, INT, names,
459 25, peak_meter_set_clip_hold); 464 25, peak_meter_set_clip_hold);
460 465
461 peak_meter_init_times(global_settings.peak_meter_release, 466 peak_meter_init_times(global_settings.peak_meter_release,
462 global_settings.peak_meter_hold, 467 global_settings.peak_meter_hold,
463 global_settings.peak_meter_clip_hold); 468 global_settings.peak_meter_clip_hold);
464 469
465 return retval; 470 return retval;
@@ -481,21 +486,21 @@ static bool peak_meter_release(void) {
481 NULL, 1, 1, 0x7e, NULL); 486 NULL, 1, 1, 0x7e, NULL);
482 487
483 peak_meter_init_times(global_settings.peak_meter_release, 488 peak_meter_init_times(global_settings.peak_meter_release,
484 global_settings.peak_meter_hold, 489 global_settings.peak_meter_hold,
485 global_settings.peak_meter_clip_hold); 490 global_settings.peak_meter_clip_hold);
486 491
487 return retval; 492 return retval;
488} 493}
489 494
490/** 495/**
491 * Menu to select wether the scale of the meter 496 * Menu to select wether the scale of the meter
492 * displays dBfs of linear values. 497 * displays dBfs of linear values.
493 */ 498 */
494static bool peak_meter_scale(void) { 499static bool peak_meter_scale(void) {
495 bool retval = false; 500 bool retval = false;
496 bool use_dbfs = global_settings.peak_meter_dbfs; 501 bool use_dbfs = global_settings.peak_meter_dbfs;
497 retval = set_bool_options(str(LANG_PM_SCALE), 502 retval = set_bool_options(str(LANG_PM_SCALE),
498 &use_dbfs, 503 &use_dbfs,
499 STR(LANG_PM_DBFS), STR(LANG_PM_LINEAR), 504 STR(LANG_PM_DBFS), STR(LANG_PM_LINEAR),
500 NULL); 505 NULL);
501 506
@@ -516,7 +521,7 @@ static bool peak_meter_scale(void) {
516 global_settings.peak_meter_max = -peak_meter_get_max() / 100; 521 global_settings.peak_meter_max = -peak_meter_get_max() / 100;
517 } else { 522 } else {
518 int max; 523 int max;
519 524
520 /* linear percent */ 525 /* linear percent */
521 global_settings.peak_meter_min = peak_meter_get_min(); 526 global_settings.peak_meter_min = peak_meter_get_min();
522 527
@@ -549,14 +554,14 @@ static bool peak_meter_min(void) {
549 &min, NULL, 1, -89, range_max, NULL); 554 &min, NULL, 1, -89, range_max, NULL);
550 555
551 global_settings.peak_meter_min = - min; 556 global_settings.peak_meter_min = - min;
552 } 557 }
553 558
554 /* for linear scale */ 559 /* for linear scale */
555 else { 560 else {
556 int min = global_settings.peak_meter_min; 561 int min = global_settings.peak_meter_min;
557 562
558 retval = set_int(str(LANG_PM_MIN), "%", UNIT_PERCENT, 563 retval = set_int(str(LANG_PM_MIN), "%", UNIT_PERCENT,
559 &min, NULL, 564 &min, NULL,
560 1, 0, global_settings.peak_meter_max - 1, NULL); 565 1, 0, global_settings.peak_meter_max - 1, NULL);
561 566
562 global_settings.peak_meter_min = (unsigned char)min; 567 global_settings.peak_meter_min = (unsigned char)min;
@@ -584,14 +589,14 @@ static bool peak_meter_max(void) {
584 589
585 global_settings.peak_meter_max = - max; 590 global_settings.peak_meter_max = - max;
586 591
587 } 592 }
588 593
589 /* for linear scale */ 594 /* for linear scale */
590 else { 595 else {
591 int max = global_settings.peak_meter_max; 596 int max = global_settings.peak_meter_max;
592 597
593 retval = set_int(str(LANG_PM_MAX), "%", UNIT_PERCENT, 598 retval = set_int(str(LANG_PM_MAX), "%", UNIT_PERCENT,
594 &max, NULL, 599 &max, NULL,
595 1, global_settings.peak_meter_min + 1, 100, NULL); 600 1, global_settings.peak_meter_min + 1, 100, NULL);
596 601
597 global_settings.peak_meter_max = (unsigned char)max; 602 global_settings.peak_meter_max = (unsigned char)max;
@@ -604,14 +609,14 @@ static bool peak_meter_max(void) {
604/** 609/**
605 * Menu to configure the peak meter 610 * Menu to configure the peak meter
606 */ 611 */
607static bool peak_meter_menu(void) 612static bool peak_meter_menu(void)
608{ 613{
609 int m; 614 int m;
610 bool result; 615 bool result;
611 616
612 static const struct menu_item items[] = { 617 static const struct menu_item items[] = {
613 { ID2P(LANG_PM_RELEASE) , peak_meter_release }, 618 { ID2P(LANG_PM_RELEASE) , peak_meter_release },
614 { ID2P(LANG_PM_PEAK_HOLD), peak_meter_hold }, 619 { ID2P(LANG_PM_PEAK_HOLD), peak_meter_hold },
615 { ID2P(LANG_PM_CLIP_HOLD), peak_meter_clip_hold }, 620 { ID2P(LANG_PM_CLIP_HOLD), peak_meter_clip_hold },
616 { ID2P(LANG_PM_SCALE) , peak_meter_scale }, 621 { ID2P(LANG_PM_SCALE) , peak_meter_scale },
617 { ID2P(LANG_PM_MIN) , peak_meter_min }, 622 { ID2P(LANG_PM_MIN) , peak_meter_min },
@@ -634,7 +639,7 @@ static bool shuffle(void)
634static bool repeat_mode(void) 639static bool repeat_mode(void)
635{ 640{
636 bool result; 641 bool result;
637 static const struct opt_items names[] = { 642 static const struct opt_items names[] = {
638 { STR(LANG_OFF) }, 643 { STR(LANG_OFF) },
639 { STR(LANG_REPEAT_ALL) }, 644 { STR(LANG_REPEAT_ALL) },
640 { STR(LANG_REPEAT_ONE) }, 645 { STR(LANG_REPEAT_ONE) },
@@ -713,7 +718,7 @@ static bool sort_dir(void)
713 718
714static bool resume(void) 719static bool resume(void)
715{ 720{
716 return set_bool( str(LANG_RESUME), &global_settings.resume); 721 return set_bool( str(LANG_RESUME), &global_settings.resume);
717} 722}
718 723
719#ifdef HAVE_SPDIF_POWER 724#ifdef HAVE_SPDIF_POWER
@@ -839,7 +844,7 @@ static bool scroll_delay(void)
839{ 844{
840 int dummy = global_settings.scroll_delay * (HZ/10); 845 int dummy = global_settings.scroll_delay * (HZ/10);
841 int rc = set_int(str(LANG_SCROLL_DELAY), "ms", UNIT_MS, 846 int rc = set_int(str(LANG_SCROLL_DELAY), "ms", UNIT_MS,
842 &dummy, 847 &dummy,
843 &lcd_scroll_delay, 100, 0, 2500, NULL ); 848 &lcd_scroll_delay, 100, 0, 2500, NULL );
844 global_settings.scroll_delay = dummy / (HZ/10); 849 global_settings.scroll_delay = dummy / (HZ/10);
845 return rc; 850 return rc;
@@ -871,7 +876,7 @@ static bool scroll_step(void)
871static bool bidir_limit(void) 876static bool bidir_limit(void)
872{ 877{
873 return set_int(str(LANG_BIDIR_SCROLL), "%", UNIT_PERCENT, 878 return set_int(str(LANG_BIDIR_SCROLL), "%", UNIT_PERCENT,
874 &global_settings.bidir_limit, 879 &global_settings.bidir_limit,
875 &lcd_bidir_scroll, 25, 0, 200, NULL ); 880 &lcd_bidir_scroll, 25, 0, 200, NULL );
876} 881}
877 882
@@ -895,7 +900,7 @@ static bool jump_scroll_delay(void)
895{ 900{
896 int dummy = global_settings.jump_scroll_delay * (HZ/10); 901 int dummy = global_settings.jump_scroll_delay * (HZ/10);
897 int rc = set_int(str(LANG_JUMP_SCROLL_DELAY), "ms", UNIT_MS, 902 int rc = set_int(str(LANG_JUMP_SCROLL_DELAY), "ms", UNIT_MS,
898 &dummy, 903 &dummy,
899 &lcd_jump_scroll_delay, 100, 0, 2500, NULL ); 904 &lcd_jump_scroll_delay, 100, 0, 2500, NULL );
900 global_settings.jump_scroll_delay = dummy / (HZ/10); 905 global_settings.jump_scroll_delay = dummy / (HZ/10);
901 return rc; 906 return rc;
@@ -909,7 +914,7 @@ static bool jump_scroll_delay(void)
909static bool battery_capacity(void) 914static bool battery_capacity(void)
910{ 915{
911 return set_int(str(LANG_BATTERY_CAPACITY), "mAh", UNIT_MAH, 916 return set_int(str(LANG_BATTERY_CAPACITY), "mAh", UNIT_MAH,
912 &global_settings.battery_capacity, 917 &global_settings.battery_capacity,
913 &set_battery_capacity, 50, BATTERY_CAPACITY_MIN, 918 &set_battery_capacity, 50, BATTERY_CAPACITY_MIN,
914 BATTERY_CAPACITY_MAX, NULL ); 919 BATTERY_CAPACITY_MAX, NULL );
915} 920}
@@ -961,11 +966,11 @@ static bool timedate_set(void)
961 966
962static bool timeformat_set(void) 967static bool timeformat_set(void)
963{ 968{
964 static const struct opt_items names[] = { 969 static const struct opt_items names[] = {
965 { STR(LANG_24_HOUR_CLOCK) }, 970 { STR(LANG_24_HOUR_CLOCK) },
966 { STR(LANG_12_HOUR_CLOCK) } 971 { STR(LANG_12_HOUR_CLOCK) }
967 }; 972 };
968 return set_option(str(LANG_TIMEFORMAT), &global_settings.timeformat, 973 return set_option(str(LANG_TIMEFORMAT), &global_settings.timeformat,
969 INT, names, 2, NULL); 974 INT, names, 2, NULL);
970} 975}
971#endif 976#endif
@@ -1027,11 +1032,11 @@ static bool buffer_margin(void)
1027 { "5min", TALK_ID(5, UNIT_MIN) }, 1032 { "5min", TALK_ID(5, UNIT_MIN) },
1028 { "10min", TALK_ID(10, UNIT_MIN) } 1033 { "10min", TALK_ID(10, UNIT_MIN) }
1029 }; 1034 };
1030 1035
1031 ret = set_option(str(LANG_MP3BUFFER_MARGIN), &global_settings.buffer_margin, 1036 ret = set_option(str(LANG_MP3BUFFER_MARGIN), &global_settings.buffer_margin,
1032 INT, names, 8, NULL); 1037 INT, names, 8, NULL);
1033 audio_set_buffer_margin(global_settings.buffer_margin); 1038 audio_set_buffer_margin(global_settings.buffer_margin);
1034 1039
1035 return ret; 1040 return ret;
1036} 1041}
1037#else 1042#else
@@ -1044,7 +1049,7 @@ static bool buffer_margin(void)
1044#endif 1049#endif
1045 1050
1046static bool ff_rewind_min_step(void) 1051static bool ff_rewind_min_step(void)
1047{ 1052{
1048 static const struct opt_items names[] = { 1053 static const struct opt_items names[] = {
1049 { "1s", TALK_ID(1, UNIT_SEC) }, 1054 { "1s", TALK_ID(1, UNIT_SEC) },
1050 { "2s", TALK_ID(2, UNIT_SEC) }, 1055 { "2s", TALK_ID(2, UNIT_SEC) },
@@ -1062,8 +1067,8 @@ static bool ff_rewind_min_step(void)
1062 { "60s", TALK_ID(60, UNIT_SEC) } 1067 { "60s", TALK_ID(60, UNIT_SEC) }
1063 }; 1068 };
1064 return set_option(str(LANG_FFRW_STEP), &global_settings.ff_rewind_min_step, 1069 return set_option(str(LANG_FFRW_STEP), &global_settings.ff_rewind_min_step,
1065 INT, names, 14, NULL ); 1070 INT, names, 14, NULL );
1066} 1071}
1067 1072
1068static bool set_fade_on_stop(void) 1073static bool set_fade_on_stop(void)
1069{ 1074{
@@ -1078,7 +1083,7 @@ static bool set_party_mode(void)
1078#ifdef CONFIG_BACKLIGHT 1083#ifdef CONFIG_BACKLIGHT
1079static bool set_bl_filter_first_keypress(void) 1084static bool set_bl_filter_first_keypress(void)
1080{ 1085{
1081 bool result = set_bool( str(LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS), 1086 bool result = set_bool( str(LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS),
1082 &global_settings.bl_filter_first_keypress ); 1087 &global_settings.bl_filter_first_keypress );
1083 set_backlight_filter_keypress(global_settings.bl_filter_first_keypress); 1088 set_backlight_filter_keypress(global_settings.bl_filter_first_keypress);
1084 return result; 1089 return result;
@@ -1086,18 +1091,18 @@ static bool set_bl_filter_first_keypress(void)
1086#ifdef HAVE_REMOTE_LCD 1091#ifdef HAVE_REMOTE_LCD
1087static bool set_remote_bl_filter_first_keypress(void) 1092static bool set_remote_bl_filter_first_keypress(void)
1088{ 1093{
1089 bool result = set_bool( str(LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS), 1094 bool result = set_bool( str(LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS),
1090 &global_settings.remote_bl_filter_first_keypress ); 1095 &global_settings.remote_bl_filter_first_keypress );
1091 set_remote_backlight_filter_keypress(global_settings.remote_bl_filter_first_keypress); 1096 set_remote_backlight_filter_keypress(global_settings.remote_bl_filter_first_keypress);
1092 return result; 1097 return result;
1093} 1098}
1094#endif 1099#endif
1095#endif 1100#endif
1096 1101
1097static bool ff_rewind_accel(void) 1102static bool ff_rewind_accel(void)
1098{ 1103{
1099 static const struct opt_items names[] = { 1104 static const struct opt_items names[] = {
1100 { STR(LANG_OFF) }, 1105 { STR(LANG_OFF) },
1101 { "2x/1s", TALK_ID(1, UNIT_SEC) }, 1106 { "2x/1s", TALK_ID(1, UNIT_SEC) },
1102 { "2x/2s", TALK_ID(2, UNIT_SEC) }, 1107 { "2x/2s", TALK_ID(2, UNIT_SEC) },
1103 { "2x/3s", TALK_ID(3, UNIT_SEC) }, 1108 { "2x/3s", TALK_ID(3, UNIT_SEC) },
@@ -1114,9 +1119,9 @@ static bool ff_rewind_accel(void)
1114 { "2x/14s", TALK_ID(14, UNIT_SEC) }, 1119 { "2x/14s", TALK_ID(14, UNIT_SEC) },
1115 { "2x/15s", TALK_ID(15, UNIT_SEC) } 1120 { "2x/15s", TALK_ID(15, UNIT_SEC) }
1116 }; 1121 };
1117 return set_option(str(LANG_FFRW_ACCEL), &global_settings.ff_rewind_accel, 1122 return set_option(str(LANG_FFRW_ACCEL), &global_settings.ff_rewind_accel,
1118 INT, names, 16, NULL ); 1123 INT, names, 16, NULL );
1119} 1124}
1120 1125
1121static bool browse_current(void) 1126static bool browse_current(void)
1122{ 1127{
@@ -1157,7 +1162,7 @@ static bool voice_menus(void)
1157 1162
1158/* this is used 2 times below, so it saves memory to put it in global scope */ 1163/* this is used 2 times below, so it saves memory to put it in global scope */
1159static const struct opt_items voice_names[] = { 1164static const struct opt_items voice_names[] = {
1160 { STR(LANG_OFF) }, 1165 { STR(LANG_OFF) },
1161 { STR(LANG_VOICE_NUMBER) }, 1166 { STR(LANG_VOICE_NUMBER) },
1162 { STR(LANG_VOICE_SPELL) }, 1167 { STR(LANG_VOICE_SPELL) },
1163 { STR(LANG_VOICE_DIR_HOVER) } 1168 { STR(LANG_VOICE_DIR_HOVER) }
@@ -1165,7 +1170,7 @@ static const struct opt_items voice_names[] = {
1165 1170
1166static bool voice_dirs(void) 1171static bool voice_dirs(void)
1167{ 1172{
1168 return set_option( str(LANG_VOICE_DIR), 1173 return set_option( str(LANG_VOICE_DIR),
1169 &global_settings.talk_dir, INT, voice_names, 4, NULL); 1174 &global_settings.talk_dir, INT, voice_names, 4, NULL);
1170} 1175}
1171 1176
@@ -1173,11 +1178,11 @@ static bool voice_files(void)
1173{ 1178{
1174 int oldval = global_settings.talk_file; 1179 int oldval = global_settings.talk_file;
1175 bool ret; 1180 bool ret;
1176 ret = set_option( str(LANG_VOICE_FILE), 1181 ret = set_option( str(LANG_VOICE_FILE),
1177 &global_settings.talk_file, INT, voice_names, 4, NULL); 1182 &global_settings.talk_file, INT, voice_names, 4, NULL);
1178 if (oldval != 3 && global_settings.talk_file == 3) 1183 if (oldval != 3 && global_settings.talk_file == 3)
1179 { /* force reload if newly talking thumbnails, 1184 { /* force reload if newly talking thumbnails,
1180 because the clip presence is cached only if enabled */ 1185 because the clip presence is cached only if enabled */
1181 reload_directory(); 1186 reload_directory();
1182 } 1187 }
1183 return ret; 1188 return ret;
@@ -1297,9 +1302,9 @@ static bool codepage_setting(void)
1297#if CONFIG_CODEC == SWCODEC 1302#if CONFIG_CODEC == SWCODEC
1298static bool replaygain(void) 1303static bool replaygain(void)
1299{ 1304{
1300 bool result = set_bool(str(LANG_REPLAYGAIN_ENABLE), 1305 bool result = set_bool(str(LANG_REPLAYGAIN_ENABLE),
1301 &global_settings.replaygain); 1306 &global_settings.replaygain);
1302 1307
1303 dsp_set_replaygain(true); 1308 dsp_set_replaygain(true);
1304 return result; 1309 return result;
1305} 1310}
@@ -1320,26 +1325,26 @@ static bool replaygain_mode(void)
1320 1325
1321static bool replaygain_noclip(void) 1326static bool replaygain_noclip(void)
1322{ 1327{
1323 bool result = set_bool(str(LANG_REPLAYGAIN_NOCLIP), 1328 bool result = set_bool(str(LANG_REPLAYGAIN_NOCLIP),
1324 &global_settings.replaygain_noclip); 1329 &global_settings.replaygain_noclip);
1325 1330
1326 dsp_set_replaygain(true); 1331 dsp_set_replaygain(true);
1327 return result; 1332 return result;
1328} 1333}
1329 1334
1330void replaygain_preamp_format(char* buffer, int buffer_size, int value, 1335void replaygain_preamp_format(char* buffer, int buffer_size, int value,
1331 const char* unit) 1336 const char* unit)
1332{ 1337{
1333 int v = abs(value); 1338 int v = abs(value);
1334 1339
1335 snprintf(buffer, buffer_size, "%s%d.%d %s", value < 0 ? "-" : "", 1340 snprintf(buffer, buffer_size, "%s%d.%d %s", value < 0 ? "-" : "",
1336 v / 10, v % 10, unit); 1341 v / 10, v % 10, unit);
1337} 1342}
1338 1343
1339static bool replaygain_preamp(void) 1344static bool replaygain_preamp(void)
1340{ 1345{
1341 bool result = set_int(str(LANG_REPLAYGAIN_PREAMP), str(LANG_UNIT_DB), 1346 bool result = set_int(str(LANG_REPLAYGAIN_PREAMP), str(LANG_UNIT_DB),
1342 UNIT_DB, &global_settings.replaygain_preamp, NULL, 1, -120, 120, 1347 UNIT_DB, &global_settings.replaygain_preamp, NULL, 1, -120, 120,
1343 replaygain_preamp_format); 1348 replaygain_preamp_format);
1344 1349
1345 dsp_set_replaygain(true); 1350 dsp_set_replaygain(true);
@@ -1374,10 +1379,10 @@ static bool crossfade(void)
1374 }; 1379 };
1375 1380
1376 bool ret; 1381 bool ret;
1377 1382
1378 ret=set_option( str(LANG_CROSSFADE_ENABLE), 1383 ret=set_option( str(LANG_CROSSFADE_ENABLE),
1379 &global_settings.crossfade, INT, names, 3, NULL); 1384 &global_settings.crossfade, INT, names, 3, NULL);
1380 1385
1381 audio_set_crossfade(global_settings.crossfade); 1386 audio_set_crossfade(global_settings.crossfade);
1382 1387
1383 return ret; 1388 return ret;
@@ -1436,7 +1441,7 @@ static bool crossfade_fade_out_mixmode(void)
1436 bool ret; 1441 bool ret;
1437 ret=set_option( str(LANG_CROSSFADE_FADE_OUT_MODE), 1442 ret=set_option( str(LANG_CROSSFADE_FADE_OUT_MODE),
1438 &global_settings.crossfade_fade_out_mixmode, INT, names, 2, NULL); 1443 &global_settings.crossfade_fade_out_mixmode, INT, names, 2, NULL);
1439 1444
1440 return ret; 1445 return ret;
1441} 1446}
1442 1447
@@ -1475,7 +1480,7 @@ static bool beep(void)
1475 bool ret; 1480 bool ret;
1476 ret=set_option( str(LANG_BEEP), 1481 ret=set_option( str(LANG_BEEP),
1477 &global_settings.beep, INT, names, 4, NULL); 1482 &global_settings.beep, INT, names, 4, NULL);
1478 1483
1479 return ret; 1484 return ret;
1480} 1485}
1481#endif 1486#endif
@@ -1495,7 +1500,7 @@ static bool dircache(void)
1495 1500
1496 if (!result) 1501 if (!result)
1497 dircache_disable(); 1502 dircache_disable();
1498 1503
1499 return result; 1504 return result;
1500} 1505}
1501 1506
@@ -1549,7 +1554,7 @@ static bool playback_settings_menu(void)
1549 result = menu_run(m); 1554 result = menu_run(m);
1550 menu_exit(m); 1555 menu_exit(m);
1551 1556
1552 if ((old_shuffle != global_settings.playlist_shuffle) 1557 if ((old_shuffle != global_settings.playlist_shuffle)
1553 && (audio_status() & AUDIO_STATUS_PLAY)) 1558 && (audio_status() & AUDIO_STATUS_PLAY))
1554 { 1559 {
1555#if CONFIG_CODEC == SWCODEC 1560#if CONFIG_CODEC == SWCODEC
@@ -1685,10 +1690,16 @@ static bool lcd_settings_menu(void)
1685#endif 1690#endif
1686 { ID2P(LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS), set_bl_filter_first_keypress }, 1691 { ID2P(LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS), set_bl_filter_first_keypress },
1687#endif /* CONFIG_BACKLIGHT */ 1692#endif /* CONFIG_BACKLIGHT */
1693#ifndef HAVE_LCD_COLOR
1688 { ID2P(LANG_CONTRAST), contrast }, 1694 { ID2P(LANG_CONTRAST), contrast },
1695#endif
1689#ifdef HAVE_LCD_BITMAP 1696#ifdef HAVE_LCD_BITMAP
1697#ifndef HAVE_LCD_COLOR
1690 { ID2P(LANG_INVERT), invert }, 1698 { ID2P(LANG_INVERT), invert },
1699#endif
1700#ifdef HAVE_LCD_FLIP
1691 { ID2P(LANG_FLIP_DISPLAY), flip_display }, 1701 { ID2P(LANG_FLIP_DISPLAY), flip_display },
1702#endif
1692 { ID2P(LANG_INVERT_CURSOR), invert_cursor }, 1703 { ID2P(LANG_INVERT_CURSOR), invert_cursor },
1693#endif 1704#endif
1694#ifdef HAVE_LCD_COLOR 1705#ifdef HAVE_LCD_COLOR
@@ -1952,7 +1963,7 @@ bool settings_menu(void)
1952 { ID2P(LANG_LANGUAGE), language_browse }, 1963 { ID2P(LANG_LANGUAGE), language_browse },
1953 { ID2P(LANG_VOICE), voice_menu }, 1964 { ID2P(LANG_VOICE), voice_menu },
1954 }; 1965 };
1955 1966
1956 m=menu_init( items, sizeof(items) / sizeof(*items), NULL, 1967 m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
1957 NULL, NULL, NULL); 1968 NULL, NULL, NULL);
1958 result = menu_run(m); 1969 result = menu_run(m);
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h
index a96da0a352..335d3eadac 100644
--- a/firmware/export/config-fmrecorder.h
+++ b/firmware/export/config-fmrecorder.h
@@ -4,6 +4,9 @@
4/* define this if you have a bitmap LCD display */ 4/* define this if you have a bitmap LCD display */
5#define HAVE_LCD_BITMAP 1 5#define HAVE_LCD_BITMAP 1
6 6
7/* define this if you can flip your LCD */
8#define HAVE_LCD_FLIP
9
7/* LCD dimensions */ 10/* LCD dimensions */
8#define LCD_WIDTH 112 11#define LCD_WIDTH 112
9#define LCD_HEIGHT 64 12#define LCD_HEIGHT 64
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h
index bc8968902d..3185801078 100644
--- a/firmware/export/config-h100.h
+++ b/firmware/export/config-h100.h
@@ -13,6 +13,9 @@
13/* define this if you have a bitmap LCD display */ 13/* define this if you have a bitmap LCD display */
14#define HAVE_LCD_BITMAP 1 14#define HAVE_LCD_BITMAP 1
15 15
16/* define this if you can flip your LCD */
17#define HAVE_LCD_FLIP
18
16/* LCD dimensions */ 19/* LCD dimensions */
17#define LCD_WIDTH 160 20#define LCD_WIDTH 160
18#define LCD_HEIGHT 128 21#define LCD_HEIGHT 128
diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h
index bbfa942ee7..a95698de69 100644
--- a/firmware/export/config-h120.h
+++ b/firmware/export/config-h120.h
@@ -9,6 +9,9 @@
9/* define this if you have a bitmap LCD display */ 9/* define this if you have a bitmap LCD display */
10#define HAVE_LCD_BITMAP 1 10#define HAVE_LCD_BITMAP 1
11 11
12/* define this if you can flip your LCD */
13#define HAVE_LCD_FLIP
14
12/* LCD dimensions */ 15/* LCD dimensions */
13#define LCD_WIDTH 160 16#define LCD_WIDTH 160
14#define LCD_HEIGHT 128 17#define LCD_HEIGHT 128
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h
index 88feb9d649..8a01203b87 100644
--- a/firmware/export/config-h300.h
+++ b/firmware/export/config-h300.h
@@ -12,6 +12,9 @@
12/* define this if you have a colour LCD */ 12/* define this if you have a colour LCD */
13#define HAVE_LCD_COLOR 1 13#define HAVE_LCD_COLOR 1
14 14
15/* define this if you can flip your LCD */
16#define HAVE_LCD_FLIP
17
15/* LCD dimensions */ 18/* LCD dimensions */
16#define LCD_WIDTH 220 19#define LCD_WIDTH 220
17#define LCD_HEIGHT 176 20#define LCD_HEIGHT 176
diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h
index d0e6900499..9ec7e46753 100644
--- a/firmware/export/config-ondiofm.h
+++ b/firmware/export/config-ondiofm.h
@@ -4,6 +4,9 @@
4/* define this if you have a bitmap LCD display */ 4/* define this if you have a bitmap LCD display */
5#define HAVE_LCD_BITMAP 1 5#define HAVE_LCD_BITMAP 1
6 6
7/* define this if you can flip your LCD */
8#define HAVE_LCD_FLIP
9
7/* LCD dimensions */ 10/* LCD dimensions */
8#define LCD_WIDTH 112 11#define LCD_WIDTH 112
9#define LCD_HEIGHT 64 12#define LCD_HEIGHT 64
diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h
index 41490f3e3e..a856450972 100644
--- a/firmware/export/config-ondiosp.h
+++ b/firmware/export/config-ondiosp.h
@@ -1,6 +1,9 @@
1/* define this if you have a bitmap LCD display */ 1/* define this if you have a bitmap LCD display */
2#define HAVE_LCD_BITMAP 1 2#define HAVE_LCD_BITMAP 1
3 3
4/* define this if you can flip your LCD */
5#define HAVE_LCD_FLIP
6
4/* LCD dimensions */ 7/* LCD dimensions */
5#define LCD_WIDTH 112 8#define LCD_WIDTH 112
6#define LCD_HEIGHT 64 9#define LCD_HEIGHT 64
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h
index fee2b2a2e0..d727519421 100644
--- a/firmware/export/config-recorder.h
+++ b/firmware/export/config-recorder.h
@@ -4,6 +4,9 @@
4/* define this if you have a bitmap LCD display */ 4/* define this if you have a bitmap LCD display */
5#define HAVE_LCD_BITMAP 1 5#define HAVE_LCD_BITMAP 1
6 6
7/* define this if you can flip your LCD */
8#define HAVE_LCD_FLIP
9
7/* LCD dimensions */ 10/* LCD dimensions */
8#define LCD_WIDTH 112 11#define LCD_WIDTH 112
9#define LCD_HEIGHT 64 12#define LCD_HEIGHT 64
diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h
index dd0f550626..5548c0789d 100644
--- a/firmware/export/config-recorderv2.h
+++ b/firmware/export/config-recorderv2.h
@@ -4,6 +4,9 @@
4/* define this if you have a bitmap LCD display */ 4/* define this if you have a bitmap LCD display */
5#define HAVE_LCD_BITMAP 1 5#define HAVE_LCD_BITMAP 1
6 6
7/* define this if you can flip your LCD */
8#define HAVE_LCD_FLIP
9
7/* LCD dimensions */ 10/* LCD dimensions */
8#define LCD_WIDTH 112 11#define LCD_WIDTH 112
9#define LCD_HEIGHT 64 12#define LCD_HEIGHT 64