summaryrefslogtreecommitdiff
path: root/apps/menus/time_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/menus/time_menu.c')
-rw-r--r--apps/menus/time_menu.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/menus/time_menu.c b/apps/menus/time_menu.c
index 93ca786cea..94e19b06aa 100644
--- a/apps/menus/time_menu.c
+++ b/apps/menus/time_menu.c
@@ -43,6 +43,10 @@
43#include "font.h" 43#include "font.h"
44#include "system.h" 44#include "system.h"
45 45
46#ifdef SAMSUNG_YH820
47#include "splash.h"
48#endif
49
46static int timedate_set(void) 50static int timedate_set(void)
47{ 51{
48 /* Make a local copy of the time struct */ 52 /* Make a local copy of the time struct */
@@ -280,6 +284,20 @@ int time_screen(void* ignored)
280 draw_timedate(&clock_vps[i], &screens[i]); 284 draw_timedate(&clock_vps[i], &screens[i]);
281 } 285 }
282 286
287#ifdef SAMSUNG_YH820
288 /* some hardware revisions of the yh820 have a rtc problem: if you try to set
289 the time/date it will leave the player in an absolute unresponsive state
290 which can only be reverted by removing the battery. Setting time/date
291 should be prohibited on this targets. Fortunately we can autodetect these,
292 because they always report "02:02:02" as time.
293 */
294 struct tm *tm = get_time();
295 if (tm->tm_year==102 && tm->tm_hour==2 && tm->tm_min==2 && tm->tm_sec==2) {
296 splash(4*HZ, "Can't set time/date due to hardware issues!");
297 return 0;
298 }
299#endif
300
283 ret = do_menu(&time_menu, NULL, menu, false); 301 ret = do_menu(&time_menu, NULL, menu, false);
284 pop_current_activity(); 302 pop_current_activity();
285 /* see comments above in the button callback */ 303 /* see comments above in the button callback */