1
0
Fork 0
forked from len0rd/rockbox

New Recording Option: Show recording screen on startup

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5778 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Christi Scarborough 2005-02-04 10:37:21 +00:00
parent a00619fd7b
commit 8a8bd91695
6 changed files with 36 additions and 3 deletions

View file

@ -2998,3 +2998,8 @@ eng: "Playlist"
voice: "Playlist" voice: "Playlist"
new: new:
id: LANG_RECORD_STARTUP
desc: Start Rockbox in Recording screen
eng: "Show recording screen on startup"
voice: "Show recording screen on startup"
new:

View file

@ -23,5 +23,6 @@
extern int show_logo(void); extern int show_logo(void);
extern bool main_menu(void); extern bool main_menu(void);
extern bool rec_menu(void);
#endif #endif

View file

@ -350,8 +350,12 @@ static const struct bit_entry hd_bits[] =
{1, S_O(mdb_enable), 0, "mdb enable", off_on}, {1, S_O(mdb_enable), 0, "mdb enable", off_on},
{1, S_O(id3_v1_first), 0, "id3 tag priority", "v2-v1,v1-v2"}, {1, S_O(id3_v1_first), 0, "id3 tag priority", "v2-v1,v1-v2"},
/* new stuff to be added at the end */ #ifdef HAVE_RECORDING
{1, S_O(rec_startup), false, "rec screen on startup", off_on },
#endif
/* new stuff to be added at the end */
/* Sum of all bit sizes must not grow beyond 0xB8*8 = 1472 */ /* Sum of all bit sizes must not grow beyond 0xB8*8 = 1472 */
}; };

View file

@ -169,6 +169,7 @@ struct user_settings
int rec_prerecord_time; /* In seconds, 0-30, 0 means OFF */ int rec_prerecord_time; /* In seconds, 0-30, 0 means OFF */
int rec_directory; /* 0=base dir, 1=current dir */ int rec_directory; /* 0=base dir, 1=current dir */
bool rec_startup; /* true means start Rockbox in recording screen */
/* device settings */ /* device settings */

View file

@ -374,6 +374,12 @@ static bool recdirectory(void)
names, 2, NULL ); names, 2, NULL );
} }
static bool reconstartup(void)
{
return set_bool(str(LANG_RECORD_STARTUP),
&global_settings.rec_startup);
}
#endif /* MAS3587F */ #endif /* MAS3587F */
static void set_chanconf(int val) static void set_chanconf(int val)
@ -437,7 +443,7 @@ bool recording_menu(bool no_source)
{ {
int m; int m;
int i = 0; int i = 0;
struct menu_item items[8]; struct menu_item items[9];
bool result; bool result;
items[i].desc = ID2P(LANG_RECORDING_QUALITY); items[i].desc = ID2P(LANG_RECORDING_QUALITY);
@ -458,6 +464,8 @@ bool recording_menu(bool no_source)
items[i++].function = recprerecord; items[i++].function = recprerecord;
items[i].desc = ID2P(LANG_RECORD_DIRECTORY); items[i].desc = ID2P(LANG_RECORD_DIRECTORY);
items[i++].function = recdirectory; items[i++].function = recdirectory;
items[i].desc = ID2P(LANG_RECORD_STARTUP);
items[i++].function = reconstartup;
m=menu_init( items, i, NULL, NULL, NULL, NULL); m=menu_init( items, i, NULL, NULL, NULL, NULL);
result = menu_run(m); result = menu_run(m);

View file

@ -59,6 +59,7 @@
#include "misc.h" #include "misc.h"
#include "filetree.h" #include "filetree.h"
#include "dbtree.h" #include "dbtree.h"
#include "recorder/recording.h"
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
#include "widgets.h" #include "widgets.h"
@ -641,9 +642,22 @@ static bool dirbrowse(void)
lastextra = -1; lastextra = -1;
lastfirstpos = 0; lastfirstpos = 0;
if (*tc.dirfilter < NUM_FILTER_MODES) if (*tc.dirfilter < NUM_FILTER_MODES) {
start_resume(true); start_resume(true);
#ifdef HAVE_RECORDING
#ifndef SIMULATOR
if (global_settings.rec_startup && ! start_wps) {
/* We fake being in the menu structure by calling the appropriate */
/* parent when we drop out of each screen */
recording_screen();
rec_menu();
main_menu();
}
#endif
#endif
}
if (!start_wps) { if (!start_wps) {
numentries = showdir(); numentries = showdir();
if (numentries == -1) if (numentries == -1)