summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-03-07 01:59:29 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-03-07 01:59:29 +0000
commite900a90e11f66f680a327b2f5c7600f4068d8e9e (patch)
tree06cffeca6423e4cacbb695f7b6dbc20c06d70029
parent9e554a87fc79825b32d2de050734a52d5753049b (diff)
downloadrockbox-e900a90e11f66f680a327b2f5c7600f4068d8e9e.tar.gz
rockbox-e900a90e11f66f680a327b2f5c7600f4068d8e9e.zip
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
-rw-r--r--apps/recorder/recording.c10
-rw-r--r--apps/recorder/recording.h3
-rw-r--r--apps/root_menu.c3
-rw-r--r--docs/CREDITS2
4 files changed, 17 insertions, 1 deletions
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)
745 } 745 }
746} 746}
747 747
748bool recording_start_automatic = false;
749
748bool recording_screen(bool no_source) 750bool recording_screen(bool no_source)
749{ 751{
750 long button; 752 long button;
@@ -935,6 +937,14 @@ bool recording_screen(bool no_source)
935 last_audio_stat = audio_stat; 937 last_audio_stat = audio_stat;
936 } 938 }
937 939
940
941 if (recording_start_automatic)
942 {
943 /* simulate a button press */
944 button = ACTION_REC_PAUSE;
945 recording_start_automatic = false;
946 }
947
938 switch(button) 948 switch(button)
939 { 949 {
940#ifdef HAVE_REMOTE_LCD 950#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);
25char *rec_create_filename(char *buf); 25char *rec_create_filename(char *buf);
26int rec_create_directory(void); 26int rec_create_directory(void);
27 27
28/* If true, start recording automatically when recording_sreen() is entered */
29extern bool recording_start_automatic;
30
28#if CONFIG_CODEC == SWCODEC 31#if CONFIG_CODEC == SWCODEC
29/* handles device powerup and sets audio source */ 32/* handles device powerup and sets audio source */
30void rec_set_source(int source, unsigned flags); 33void 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)
333#endif 333#endif
334#ifdef HAVE_RECORDING 334#ifdef HAVE_RECORDING
335 if (global_settings.alarm_wake_up_screen == ALARM_START_REC) 335 if (global_settings.alarm_wake_up_screen == ALARM_START_REC)
336 {
337 recording_start_automatic = true;
336 ret_val = GO_TO_RECSCREEN; 338 ret_val = GO_TO_RECSCREEN;
339 }
337#endif 340#endif
338 } 341 }
339#endif /* HAVE_RTC_ALARM */ 342#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
276Sean Morrisey 276Sean Morrisey
277Shay Green 277Shay Green
278Nick Vanderweit 278Nick Vanderweit
279 279Simon Menzel