summaryrefslogtreecommitdiff
path: root/apps/recorder/recording.c
diff options
context:
space:
mode:
authorMartin Scarratt <mmmm@rockbox.org>2006-09-27 21:36:50 +0000
committerMartin Scarratt <mmmm@rockbox.org>2006-09-27 21:36:50 +0000
commit22e7e940a759188080cf33d5afb699ada0b107fc (patch)
tree15902e51017a2af5f0c504cf778194bb92fde1dc /apps/recorder/recording.c
parentc06eadb572a7314fb42f59c33060c6b148fdef8a (diff)
downloadrockbox-22e7e940a759188080cf33d5afb699ada0b107fc.tar.gz
rockbox-22e7e940a759188080cf33d5afb699ada0b107fc.zip
Oops, didnt mean to commit this
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11081 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/recording.c')
-rw-r--r--apps/recorder/recording.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index fd9ea34be5..c51569ad31 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -491,8 +491,12 @@ void adjust_cursor(void)
491 491
492char *rec_create_filename(char *buffer) 492char *rec_create_filename(char *buffer)
493{ 493{
494 strncpy(buffer, global_settings.rec_path, MAX_PATH); 494 if(global_settings.rec_directory)
495 495 getcwd(buffer, MAX_PATH);
496 else
497 strncpy(buffer, rec_base_directory, MAX_PATH);
498
499
496#ifdef CONFIG_RTC 500#ifdef CONFIG_RTC
497 create_datetime_filename(buffer, buffer, "R", 501 create_datetime_filename(buffer, buffer, "R",
498 REC_FILE_ENDING(global_settings.rec_quality)); 502 REC_FILE_ENDING(global_settings.rec_quality));
@@ -506,16 +510,7 @@ char *rec_create_filename(char *buffer)
506int rec_create_directory(void) 510int rec_create_directory(void)
507{ 511{
508 int rc; 512 int rc;
509 DIR* dir; 513
510
511 dir = opendir(global_settings.rec_path);
512 if (dir == NULL)
513 {
514 strncpy(global_settings.rec_path, rec_base_directory, MAX_PATH);
515 global_settings.rec_directory = false;
516 }
517 else
518 closedir(dir);
519 /* Try to create the base directory if needed */ 514 /* Try to create the base directory if needed */
520 if(global_settings.rec_directory == 0) 515 if(global_settings.rec_directory == 0)
521 { 516 {
@@ -833,10 +828,6 @@ bool recording_screen(bool no_source)
833 828
834 global_settings.recscreen_on = true; 829 global_settings.recscreen_on = true;
835 cursor = 0; 830 cursor = 0;
836
837 if (strlen(global_settings.rec_path) == 0)
838 strncpy(global_settings.rec_path, rec_base_directory, MAX_PATH);
839
840#if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR) 831#if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR)
841 ata_set_led_enabled(false); 832 ata_set_led_enabled(false);
842#endif 833#endif
@@ -1729,12 +1720,10 @@ bool recording_screen(bool no_source)
1729 /* draw the trigger status */ 1720 /* draw the trigger status */
1730 if (peak_meter_trigger_status() != TRIG_OFF) 1721 if (peak_meter_trigger_status() != TRIG_OFF)
1731 { 1722 {
1732 peak_meter_draw_trig(LCD_WIDTH - TRIG_WIDTH, filename_offset[0] + 1723 peak_meter_draw_trig(LCD_WIDTH - TRIG_WIDTH, 4 * h);
1733 PM_HEIGHT + line[0]);
1734 for(i = 0; i < screen_update; i++){ 1724 for(i = 0; i < screen_update; i++){
1735 screens[i].update_rect(LCD_WIDTH - (TRIG_WIDTH + 2), 1725 screens[i].update_rect(LCD_WIDTH - (TRIG_WIDTH + 2), 4 * h,
1736 filename_offset[0] + PM_HEIGHT + 1726 TRIG_WIDTH + 2, TRIG_HEIGHT);
1737 line[0], + 2, TRIG_HEIGHT);
1738 } 1727 }
1739 } 1728 }
1740 } 1729 }