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:
parent
a00619fd7b
commit
8a8bd91695
6 changed files with 36 additions and 3 deletions
|
|
@ -2998,3 +2998,8 @@ eng: "Playlist"
|
|||
voice: "Playlist"
|
||||
new:
|
||||
|
||||
id: LANG_RECORD_STARTUP
|
||||
desc: Start Rockbox in Recording screen
|
||||
eng: "Show recording screen on startup"
|
||||
voice: "Show recording screen on startup"
|
||||
new:
|
||||
|
|
|
|||
|
|
@ -23,5 +23,6 @@
|
|||
|
||||
extern int show_logo(void);
|
||||
extern bool main_menu(void);
|
||||
extern bool rec_menu(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -350,6 +350,10 @@ static const struct bit_entry hd_bits[] =
|
|||
{1, S_O(mdb_enable), 0, "mdb enable", off_on},
|
||||
{1, S_O(id3_v1_first), 0, "id3 tag priority", "v2-v1,v1-v2"},
|
||||
|
||||
#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 */
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@ struct user_settings
|
|||
|
||||
int rec_prerecord_time; /* In seconds, 0-30, 0 means OFF */
|
||||
int rec_directory; /* 0=base dir, 1=current dir */
|
||||
bool rec_startup; /* true means start Rockbox in recording screen */
|
||||
|
||||
/* device settings */
|
||||
|
||||
|
|
|
|||
|
|
@ -374,6 +374,12 @@ static bool recdirectory(void)
|
|||
names, 2, NULL );
|
||||
}
|
||||
|
||||
static bool reconstartup(void)
|
||||
{
|
||||
return set_bool(str(LANG_RECORD_STARTUP),
|
||||
&global_settings.rec_startup);
|
||||
}
|
||||
|
||||
#endif /* MAS3587F */
|
||||
|
||||
static void set_chanconf(int val)
|
||||
|
|
@ -437,7 +443,7 @@ bool recording_menu(bool no_source)
|
|||
{
|
||||
int m;
|
||||
int i = 0;
|
||||
struct menu_item items[8];
|
||||
struct menu_item items[9];
|
||||
bool result;
|
||||
|
||||
items[i].desc = ID2P(LANG_RECORDING_QUALITY);
|
||||
|
|
@ -458,6 +464,8 @@ bool recording_menu(bool no_source)
|
|||
items[i++].function = recprerecord;
|
||||
items[i].desc = ID2P(LANG_RECORD_DIRECTORY);
|
||||
items[i++].function = recdirectory;
|
||||
items[i].desc = ID2P(LANG_RECORD_STARTUP);
|
||||
items[i++].function = reconstartup;
|
||||
|
||||
m=menu_init( items, i, NULL, NULL, NULL, NULL);
|
||||
result = menu_run(m);
|
||||
|
|
|
|||
16
apps/tree.c
16
apps/tree.c
|
|
@ -59,6 +59,7 @@
|
|||
#include "misc.h"
|
||||
#include "filetree.h"
|
||||
#include "dbtree.h"
|
||||
#include "recorder/recording.h"
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
#include "widgets.h"
|
||||
|
|
@ -641,9 +642,22 @@ static bool dirbrowse(void)
|
|||
lastextra = -1;
|
||||
lastfirstpos = 0;
|
||||
|
||||
if (*tc.dirfilter < NUM_FILTER_MODES)
|
||||
if (*tc.dirfilter < NUM_FILTER_MODES) {
|
||||
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) {
|
||||
numentries = showdir();
|
||||
if (numentries == -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue