diff options
Diffstat (limited to 'apps/screens.c')
-rw-r--r-- | apps/screens.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/screens.c b/apps/screens.c index 9cb5ebe258..e7262704f0 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -1018,6 +1018,7 @@ int view_runtime(void) | |||
1018 | { | 1018 | { |
1019 | static const char *lines[]={ID2P(LANG_CLEAR_TIME)}; | 1019 | static const char *lines[]={ID2P(LANG_CLEAR_TIME)}; |
1020 | static const struct text_message message={lines, 1}; | 1020 | static const struct text_message message={lines, 1}; |
1021 | bool say_runtime = true; | ||
1021 | 1022 | ||
1022 | struct gui_synclist lists; | 1023 | struct gui_synclist lists; |
1023 | int action; | 1024 | int action; |
@@ -1031,12 +1032,17 @@ int view_runtime(void) | |||
1031 | gui_synclist_set_voice_callback(&lists, runtime_speak_data); | 1032 | gui_synclist_set_voice_callback(&lists, runtime_speak_data); |
1032 | gui_synclist_set_icon_callback(&lists, NULL); | 1033 | gui_synclist_set_icon_callback(&lists, NULL); |
1033 | gui_synclist_set_nb_items(&lists, 4); | 1034 | gui_synclist_set_nb_items(&lists, 4); |
1034 | gui_synclist_speak_item(&lists); | 1035 | |
1035 | while(1) | 1036 | while(1) |
1036 | { | 1037 | { |
1037 | global_status.runtime += ((current_tick - lasttime) / HZ); | 1038 | global_status.runtime += ((current_tick - lasttime) / HZ); |
1038 | 1039 | ||
1039 | lasttime = current_tick; | 1040 | lasttime = current_tick; |
1041 | if (say_runtime) | ||
1042 | { | ||
1043 | gui_synclist_speak_item(&lists); | ||
1044 | say_runtime = false; | ||
1045 | } | ||
1040 | gui_synclist_draw(&lists); | 1046 | gui_synclist_draw(&lists); |
1041 | list_do_action(CONTEXT_STD, HZ, | 1047 | list_do_action(CONTEXT_STD, HZ, |
1042 | &lists, &action, LIST_WRAP_UNLESS_HELD); | 1048 | &lists, &action, LIST_WRAP_UNLESS_HELD); |
@@ -1049,7 +1055,7 @@ int view_runtime(void) | |||
1049 | global_status.runtime = 0; | 1055 | global_status.runtime = 0; |
1050 | else | 1056 | else |
1051 | global_status.topruntime = 0; | 1057 | global_status.topruntime = 0; |
1052 | gui_synclist_speak_item(&lists); | 1058 | say_runtime = true; |
1053 | } | 1059 | } |
1054 | } | 1060 | } |
1055 | if(default_event_handler(action) == SYS_USB_CONNECTED) | 1061 | if(default_event_handler(action) == SYS_USB_CONNECTED) |