diff options
Diffstat (limited to 'apps/plugins/rockboy/menu.c')
-rw-r--r-- | apps/plugins/rockboy/menu.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/plugins/rockboy/menu.c b/apps/plugins/rockboy/menu.c index 803310f70c..0c9e46bbdf 100644 --- a/apps/plugins/rockboy/menu.c +++ b/apps/plugins/rockboy/menu.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include "rockmacros.h" | 8 | #include "rockmacros.h" |
9 | #include "mem.h" | 9 | #include "mem.h" |
10 | #include "lib/oldmenuapi.h" | 10 | #include "lib/oldmenuapi.h" |
11 | #include "rtc-gb.h" | ||
11 | 12 | ||
12 | #if (CONFIG_KEYPAD == IPOD_4G_PAD) | 13 | #if (CONFIG_KEYPAD == IPOD_4G_PAD) |
13 | #define MENU_BUTTON_UP BUTTON_SCROLL_BACK | 14 | #define MENU_BUTTON_UP BUTTON_SCROLL_BACK |
@@ -84,6 +85,11 @@ int do_user_menu(void) { | |||
84 | bool done=false; | 85 | bool done=false; |
85 | int m, ret=0; | 86 | int m, ret=0; |
86 | int result; | 87 | int result; |
88 | int time = 0; | ||
89 | |||
90 | #if CONFIG_RTC | ||
91 | time = rb->mktime(rb->get_time()); | ||
92 | #endif | ||
87 | 93 | ||
88 | /* Clean out the button Queue */ | 94 | /* Clean out the button Queue */ |
89 | while (rb->button_get(false) != BUTTON_NONE) | 95 | while (rb->button_get(false) != BUTTON_NONE) |
@@ -129,6 +135,12 @@ int do_user_menu(void) { | |||
129 | 135 | ||
130 | rb->lcd_setfont(0); /* Reset the font */ | 136 | rb->lcd_setfont(0); /* Reset the font */ |
131 | rb->lcd_clear_display(); /* Clear display for screen size changes */ | 137 | rb->lcd_clear_display(); /* Clear display for screen size changes */ |
138 | |||
139 | /* Keep the RTC in sync */ | ||
140 | #if CONFIG_RTC | ||
141 | time = (rb->mktime(rb->get_time()) - time) * 60; | ||
142 | #endif | ||
143 | while (time-- > 0) rtc_tick(); | ||
132 | 144 | ||
133 | return ret; | 145 | return ret; |
134 | } | 146 | } |