From e900a90e11f66f680a327b2f5c7600f4068d8e9e Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 7 Mar 2007 01:59:29 +0000 Subject: Accept FS#6750, allow recording to start automatically (If alarm wakeup is set to recording) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12655 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/recording.c | 10 ++++++++++ apps/recorder/recording.h | 3 +++ apps/root_menu.c | 3 +++ docs/CREDITS | 2 +- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 8eea24d82d..a80a0df2fc 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -745,6 +745,8 @@ static void trigger_listener(int trigger_status) } } +bool recording_start_automatic = false; + bool recording_screen(bool no_source) { long button; @@ -935,6 +937,14 @@ bool recording_screen(bool no_source) last_audio_stat = audio_stat; } + + if (recording_start_automatic) + { + /* simulate a button press */ + button = ACTION_REC_PAUSE; + recording_start_automatic = false; + } + switch(button) { #ifdef HAVE_REMOTE_LCD diff --git a/apps/recorder/recording.h b/apps/recorder/recording.h index 1921074d26..3ca1f35834 100644 --- a/apps/recorder/recording.h +++ b/apps/recorder/recording.h @@ -25,6 +25,9 @@ bool recording_screen(bool no_source); char *rec_create_filename(char *buf); int rec_create_directory(void); +/* If true, start recording automatically when recording_sreen() is entered */ +extern bool recording_start_automatic; + #if CONFIG_CODEC == SWCODEC /* handles device powerup and sets audio source */ void rec_set_source(int source, unsigned flags); diff --git a/apps/root_menu.c b/apps/root_menu.c index 3b9f6eab36..ea2912524b 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c @@ -333,7 +333,10 @@ void root_menu(void) #endif #ifdef HAVE_RECORDING if (global_settings.alarm_wake_up_screen == ALARM_START_REC) + { + recording_start_automatic = true; ret_val = GO_TO_RECSCREEN; + } #endif } #endif /* HAVE_RTC_ALARM */ diff --git a/docs/CREDITS b/docs/CREDITS index e6f1073bbb..0581417ff6 100644 --- a/docs/CREDITS +++ b/docs/CREDITS @@ -276,4 +276,4 @@ Ben Keroack Sean Morrisey Shay Green Nick Vanderweit - +Simon Menzel -- cgit v1.2.3