summaryrefslogtreecommitdiff
path: root/apps/screens.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/screens.c')
-rw-r--r--apps/screens.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/screens.c b/apps/screens.c
index 8cdacd706f..dc54a00b1d 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -819,8 +819,8 @@ const int monthname[] = {
819/* little helper function for voice output */ 819/* little helper function for voice output */
820static void say_time(int cursorpos, const struct tm *tm) 820static void say_time(int cursorpos, const struct tm *tm)
821{ 821{
822 static const int unit[] = { UNIT_HOUR, UNIT_MIN, UNIT_SEC, 0, 0, 0 };
823 int value = 0; 822 int value = 0;
823 int unit = 0;
824 824
825 if (!global_settings.talk_menu) 825 if (!global_settings.talk_menu)
826 return; 826 return;
@@ -829,12 +829,15 @@ static void say_time(int cursorpos, const struct tm *tm)
829 { 829 {
830 case 0: 830 case 0:
831 value = tm->tm_hour; 831 value = tm->tm_hour;
832 unit = UNIT_HOUR;
832 break; 833 break;
833 case 1: 834 case 1:
834 value = tm->tm_min; 835 value = tm->tm_min;
836 unit = UNIT_MIN;
835 break; 837 break;
836 case 2: 838 case 2:
837 value = tm->tm_sec; 839 value = tm->tm_sec;
840 unit = UNIT_SEC;
838 break; 841 break;
839 case 3: 842 case 3:
840 value = tm->tm_year + 1900; 843 value = tm->tm_year + 1900;
@@ -847,7 +850,7 @@ static void say_time(int cursorpos, const struct tm *tm)
847 if (cursorpos == 4) /* month */ 850 if (cursorpos == 4) /* month */
848 talk_id(LANG_MONTH_JANUARY + tm->tm_mon, false); 851 talk_id(LANG_MONTH_JANUARY + tm->tm_mon, false);
849 else 852 else
850 talk_value(value, unit[cursorpos], false); 853 talk_value(value, unit, false);
851} 854}
852 855
853 856