whitespace fixes
Change-Id: I86880595b78e3cae62361c32ca57cf6f6a4ad963
This commit is contained in:
parent
cf96a4d386
commit
1697b13693
|
@ -75,10 +75,10 @@ static struct {
|
||||||
bool shuffle;
|
bool shuffle;
|
||||||
/* optional values */
|
/* optional values */
|
||||||
int pitch;
|
int pitch;
|
||||||
int speed;
|
int speed;
|
||||||
} bm;
|
} bm;
|
||||||
|
|
||||||
static bool add_bookmark(const char* bookmark_file_name, const char* bookmark,
|
static bool add_bookmark(const char* bookmark_file_name, const char* bookmark,
|
||||||
bool most_recent);
|
bool most_recent);
|
||||||
static char* create_bookmark(void);
|
static char* create_bookmark(void);
|
||||||
static bool delete_bookmark(const char* bookmark_file_name, int bookmark_id);
|
static bool delete_bookmark(const char* bookmark_file_name, int bookmark_id);
|
||||||
|
@ -275,7 +275,7 @@ static bool get_playlist_and_track(const char *bookmark, char **pl_start,
|
||||||
/* This function adds a bookmark to a file. */
|
/* This function adds a bookmark to a file. */
|
||||||
/* Returns true on successful bookmark add. */
|
/* Returns true on successful bookmark add. */
|
||||||
/* ------------------------------------------------------------------------*/
|
/* ------------------------------------------------------------------------*/
|
||||||
static bool add_bookmark(const char* bookmark_file_name, const char* bookmark,
|
static bool add_bookmark(const char* bookmark_file_name, const char* bookmark,
|
||||||
bool most_recent)
|
bool most_recent)
|
||||||
{
|
{
|
||||||
int temp_bookmark_file = 0;
|
int temp_bookmark_file = 0;
|
||||||
|
@ -466,7 +466,7 @@ bool bookmark_autoload(const char* file)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int ret = select_bookmark(global_bookmark_file_name, true, &bookmark);
|
int ret = select_bookmark(global_bookmark_file_name, true, &bookmark);
|
||||||
|
|
||||||
if (bookmark != NULL)
|
if (bookmark != NULL)
|
||||||
{
|
{
|
||||||
if (!play_bookmark(bookmark))
|
if (!play_bookmark(bookmark))
|
||||||
|
@ -475,7 +475,7 @@ bool bookmark_autoload(const char* file)
|
||||||
splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME));
|
splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Act as if autoload was done even if it failed, since the
|
/* Act as if autoload was done even if it failed, since the
|
||||||
* user did make an active selection.
|
* user did make an active selection.
|
||||||
*/
|
*/
|
||||||
return true;
|
return true;
|
||||||
|
@ -520,7 +520,7 @@ bool bookmark_load(const char* file, bool autoload)
|
||||||
{
|
{
|
||||||
splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME));
|
splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME));
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -541,7 +541,7 @@ static int get_bookmark_count(const char* bookmark_file_name)
|
||||||
{
|
{
|
||||||
read_count++;
|
read_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
close(file);
|
close(file);
|
||||||
return read_count;
|
return read_count;
|
||||||
}
|
}
|
||||||
|
@ -563,25 +563,25 @@ static int buffer_bookmarks(struct bookmark_list* bookmarks, int first_line)
|
||||||
/* Entire file fits in buffer */
|
/* Entire file fits in buffer */
|
||||||
first_line = 0;
|
first_line = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bookmarks->start = first_line;
|
bookmarks->start = first_line;
|
||||||
bookmarks->count = 0;
|
bookmarks->count = 0;
|
||||||
bookmarks->reload = false;
|
bookmarks->reload = false;
|
||||||
|
|
||||||
while(read_line(file, global_read_buffer, sizeof(global_read_buffer)) > 0)
|
while(read_line(file, global_read_buffer, sizeof(global_read_buffer)) > 0)
|
||||||
{
|
{
|
||||||
read_count++;
|
read_count++;
|
||||||
|
|
||||||
if (read_count >= first_line)
|
if (read_count >= first_line)
|
||||||
{
|
{
|
||||||
dest -= strlen(global_read_buffer) + 1;
|
dest -= strlen(global_read_buffer) + 1;
|
||||||
|
|
||||||
if (dest < ((char*) bookmarks) + sizeof(*bookmarks)
|
if (dest < ((char*) bookmarks) + sizeof(*bookmarks)
|
||||||
+ (sizeof(char*) * (bookmarks->count + 1)))
|
+ (sizeof(char*) * (bookmarks->count + 1)))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(dest, global_read_buffer);
|
strcpy(dest, global_read_buffer);
|
||||||
bookmarks->items[bookmarks->count] = dest;
|
bookmarks->items[bookmarks->count] = dest;
|
||||||
bookmarks->count++;
|
bookmarks->count++;
|
||||||
|
@ -604,22 +604,22 @@ static const char* get_bookmark_info(int list_index,
|
||||||
{
|
{
|
||||||
if (index == 0)
|
if (index == 0)
|
||||||
{
|
{
|
||||||
return list_index % 2 == 0
|
return list_index % 2 == 0
|
||||||
? (char*) str(LANG_BOOKMARK_DONT_RESUME) : " ";
|
? (char*) str(LANG_BOOKMARK_DONT_RESUME) : " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
index--;
|
index--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bookmarks->reload || (index >= bookmarks->start + bookmarks->count)
|
if (bookmarks->reload || (index >= bookmarks->start + bookmarks->count)
|
||||||
|| (index < bookmarks->start))
|
|| (index < bookmarks->start))
|
||||||
{
|
{
|
||||||
int read_index = index;
|
int read_index = index;
|
||||||
|
|
||||||
/* Using count as a guide on how far to move could possibly fail
|
/* Using count as a guide on how far to move could possibly fail
|
||||||
* sometimes. Use byte count if that is a problem?
|
* sometimes. Use byte count if that is a problem?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (read_index != 0)
|
if (read_index != 0)
|
||||||
{
|
{
|
||||||
/* Move count * 3 / 4 items in the direction the user is moving,
|
/* Move count * 3 / 4 items in the direction the user is moving,
|
||||||
|
@ -627,31 +627,31 @@ static const char* get_bookmark_info(int list_index,
|
||||||
*/
|
*/
|
||||||
int offset = bookmarks->count;
|
int offset = bookmarks->count;
|
||||||
int max = bookmarks->total_count - (bookmarks->count / 2);
|
int max = bookmarks->total_count - (bookmarks->count / 2);
|
||||||
|
|
||||||
if (read_index < bookmarks->start)
|
if (read_index < bookmarks->start)
|
||||||
{
|
{
|
||||||
offset *= 3;
|
offset *= 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
read_index = index - offset / 4;
|
read_index = index - offset / 4;
|
||||||
|
|
||||||
if (read_index > max)
|
if (read_index > max)
|
||||||
{
|
{
|
||||||
read_index = max;
|
read_index = max;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (read_index < 0)
|
if (read_index < 0)
|
||||||
{
|
{
|
||||||
read_index = 0;
|
read_index = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buffer_bookmarks(bookmarks, read_index) <= index)
|
if (buffer_bookmarks(bookmarks, read_index) <= index)
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!parse_bookmark(bookmarks->items[index - bookmarks->start], true, true))
|
if (!parse_bookmark(bookmarks->items[index - bookmarks->start], true, true))
|
||||||
{
|
{
|
||||||
return list_index % 2 == 0 ? (char*) str(LANG_BOOKMARK_INVALID) : " ";
|
return list_index % 2 == 0 ? (char*) str(LANG_BOOKMARK_INVALID) : " ";
|
||||||
|
@ -662,12 +662,12 @@ static const char* get_bookmark_info(int list_index,
|
||||||
char *name;
|
char *name;
|
||||||
char *format;
|
char *format;
|
||||||
int len = strlen(global_temp_buffer);
|
int len = strlen(global_temp_buffer);
|
||||||
|
|
||||||
if (bookmarks->show_playlist_name && len > 0)
|
if (bookmarks->show_playlist_name && len > 0)
|
||||||
{
|
{
|
||||||
name = global_temp_buffer;
|
name = global_temp_buffer;
|
||||||
len--;
|
len--;
|
||||||
|
|
||||||
if (name[len] != '/')
|
if (name[len] != '/')
|
||||||
{
|
{
|
||||||
strrsplt(name, '.');
|
strrsplt(name, '.');
|
||||||
|
@ -689,7 +689,7 @@ static const char* get_bookmark_info(int list_index,
|
||||||
name = global_filename;
|
name = global_filename;
|
||||||
format = "%s";
|
format = "%s";
|
||||||
}
|
}
|
||||||
|
|
||||||
strrsplt(global_filename, '.');
|
strrsplt(global_filename, '.');
|
||||||
snprintf(buffer, buffer_len, format, name, global_filename);
|
snprintf(buffer, buffer_len, format, name, global_filename);
|
||||||
return buffer;
|
return buffer;
|
||||||
|
@ -751,12 +751,12 @@ static int select_bookmark(const char* bookmark_file_name, bool show_dont_resume
|
||||||
gui_synclist_init(&list, &get_bookmark_info, (void*) bookmarks, false, 2, NULL);
|
gui_synclist_init(&list, &get_bookmark_info, (void*) bookmarks, false, 2, NULL);
|
||||||
if(global_settings.talk_menu)
|
if(global_settings.talk_menu)
|
||||||
gui_synclist_set_voice_callback(&list, bookmark_list_voice_cb);
|
gui_synclist_set_voice_callback(&list, bookmark_list_voice_cb);
|
||||||
gui_synclist_set_title(&list, str(LANG_BOOKMARK_SELECT_BOOKMARK),
|
gui_synclist_set_title(&list, str(LANG_BOOKMARK_SELECT_BOOKMARK),
|
||||||
Icon_Bookmark);
|
Icon_Bookmark);
|
||||||
|
|
||||||
while (!exit)
|
while (!exit)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (refresh)
|
if (refresh)
|
||||||
{
|
{
|
||||||
int count = get_bookmark_count(bookmark_file_name);
|
int count = get_bookmark_count(bookmark_file_name);
|
||||||
|
@ -805,17 +805,17 @@ static int select_bookmark(const char* bookmark_file_name, bool show_dont_resume
|
||||||
if (action == ACTION_STD_CONTEXT)
|
if (action == ACTION_STD_CONTEXT)
|
||||||
{
|
{
|
||||||
MENUITEM_STRINGLIST(menu_items, ID2P(LANG_BOOKMARK_CONTEXT_MENU),
|
MENUITEM_STRINGLIST(menu_items, ID2P(LANG_BOOKMARK_CONTEXT_MENU),
|
||||||
NULL, ID2P(LANG_BOOKMARK_CONTEXT_RESUME),
|
NULL, ID2P(LANG_BOOKMARK_CONTEXT_RESUME),
|
||||||
ID2P(LANG_BOOKMARK_CONTEXT_DELETE));
|
ID2P(LANG_BOOKMARK_CONTEXT_DELETE));
|
||||||
static const int menu_actions[] =
|
static const int menu_actions[] =
|
||||||
{
|
{
|
||||||
ACTION_STD_OK, ACTION_BMS_DELETE
|
ACTION_STD_OK, ACTION_BMS_DELETE
|
||||||
};
|
};
|
||||||
int selection = do_menu(&menu_items, NULL, NULL, false);
|
int selection = do_menu(&menu_items, NULL, NULL, false);
|
||||||
|
|
||||||
refresh = true;
|
refresh = true;
|
||||||
|
|
||||||
if (selection >= 0 && selection <=
|
if (selection >= 0 && selection <=
|
||||||
(int) (sizeof(menu_actions) / sizeof(menu_actions[0])))
|
(int) (sizeof(menu_actions) / sizeof(menu_actions[0])))
|
||||||
{
|
{
|
||||||
action = menu_actions[selection];
|
action = menu_actions[selection];
|
||||||
|
@ -842,7 +842,7 @@ static int select_bookmark(const char* bookmark_file_name, bool show_dont_resume
|
||||||
|
|
||||||
case ACTION_BMS_DELETE:
|
case ACTION_BMS_DELETE:
|
||||||
if (item >= 0)
|
if (item >= 0)
|
||||||
{
|
{
|
||||||
const char *lines[]={
|
const char *lines[]={
|
||||||
ID2P(LANG_REALLY_DELETE)
|
ID2P(LANG_REALLY_DELETE)
|
||||||
};
|
};
|
||||||
|
@ -854,7 +854,7 @@ static int select_bookmark(const char* bookmark_file_name, bool show_dont_resume
|
||||||
const struct text_message yes_message={yes_lines, 1};
|
const struct text_message yes_message={yes_lines, 1};
|
||||||
|
|
||||||
if(gui_syncyesno_run(&message, &yes_message, NULL)==YESNO_YES)
|
if(gui_syncyesno_run(&message, &yes_message, NULL)==YESNO_YES)
|
||||||
{
|
{
|
||||||
delete_bookmark(bookmark_file_name, item);
|
delete_bookmark(bookmark_file_name, item);
|
||||||
bookmarks->reload = true;
|
bookmarks->reload = true;
|
||||||
}
|
}
|
||||||
|
@ -1002,12 +1002,12 @@ static const char* skip_token(const char* s)
|
||||||
{
|
{
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*s)
|
if (*s)
|
||||||
{
|
{
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1033,11 +1033,11 @@ static bool parse_bookmark(const char *bookmark, const bool parse_filenames, con
|
||||||
{
|
{
|
||||||
const char* s = bookmark;
|
const char* s = bookmark;
|
||||||
const char* end;
|
const char* end;
|
||||||
|
|
||||||
#define GET_INT_TOKEN(var) s = int_token(s, &var)
|
#define GET_INT_TOKEN(var) s = int_token(s, &var)
|
||||||
#define GET_LONG_TOKEN(var) s = long_token(s, &var)
|
#define GET_LONG_TOKEN(var) s = long_token(s, &var)
|
||||||
#define GET_BOOL_TOKEN(var) var = (atoi(s)!=0); s = skip_token(s)
|
#define GET_BOOL_TOKEN(var) var = (atoi(s)!=0); s = skip_token(s)
|
||||||
|
|
||||||
/* if new format bookmark, extract the optional content flags,
|
/* if new format bookmark, extract the optional content flags,
|
||||||
otherwise treat as an original format bookmark */
|
otherwise treat as an original format bookmark */
|
||||||
int opt_flags = 0;
|
int opt_flags = 0;
|
||||||
|
@ -1047,7 +1047,7 @@ static bool parse_bookmark(const char *bookmark, const bool parse_filenames, con
|
||||||
s++;
|
s++;
|
||||||
GET_INT_TOKEN(opt_flags);
|
GET_INT_TOKEN(opt_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* extract all original bookmark tokens */
|
/* extract all original bookmark tokens */
|
||||||
GET_INT_TOKEN(bm.resume_index);
|
GET_INT_TOKEN(bm.resume_index);
|
||||||
GET_LONG_TOKEN(bm.resume_offset);
|
GET_LONG_TOKEN(bm.resume_offset);
|
||||||
|
@ -1057,18 +1057,18 @@ static bool parse_bookmark(const char *bookmark, const bool parse_filenames, con
|
||||||
GET_LONG_TOKEN(bm.resume_time);
|
GET_LONG_TOKEN(bm.resume_time);
|
||||||
GET_INT_TOKEN(bm.repeat_mode);
|
GET_INT_TOKEN(bm.repeat_mode);
|
||||||
GET_BOOL_TOKEN(bm.shuffle);
|
GET_BOOL_TOKEN(bm.shuffle);
|
||||||
|
|
||||||
/* extract all optional bookmark tokens */
|
/* extract all optional bookmark tokens */
|
||||||
if (opt_flags & BM_PITCH)
|
if (opt_flags & BM_PITCH)
|
||||||
GET_INT_TOKEN(bm.pitch);
|
GET_INT_TOKEN(bm.pitch);
|
||||||
if (opt_flags & BM_SPEED)
|
if (opt_flags & BM_SPEED)
|
||||||
GET_INT_TOKEN(bm.speed);
|
GET_INT_TOKEN(bm.speed);
|
||||||
|
|
||||||
if (*s == 0)
|
if (*s == 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
end = strchr(s, ';');
|
end = strchr(s, ';');
|
||||||
|
|
||||||
/* extract file names */
|
/* extract file names */
|
||||||
|
@ -1077,7 +1077,7 @@ static bool parse_bookmark(const char *bookmark, const bool parse_filenames, con
|
||||||
size_t len = (end == NULL) ? strlen(s) : (size_t) (end - s);
|
size_t len = (end == NULL) ? strlen(s) : (size_t) (end - s);
|
||||||
len = MIN(TEMP_BUF_SIZE - 1, len);
|
len = MIN(TEMP_BUF_SIZE - 1, len);
|
||||||
strlcpy(global_temp_buffer, s, len + 1);
|
strlcpy(global_temp_buffer, s, len + 1);
|
||||||
|
|
||||||
if (end != NULL)
|
if (end != NULL)
|
||||||
{
|
{
|
||||||
end++;
|
end++;
|
||||||
|
@ -1093,7 +1093,7 @@ static bool parse_bookmark(const char *bookmark, const bool parse_filenames, con
|
||||||
strlcpy(global_filename, end, MAX_PATH);
|
strlcpy(global_filename, end, MAX_PATH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ static bool search_for_cuesheet(const char *path, struct cuesheet_file *cue_file
|
||||||
{
|
{
|
||||||
strcpy(cuepath, CUE_DIR);
|
strcpy(cuepath, CUE_DIR);
|
||||||
if (strlcat(cuepath, slash, MAX_PATH) >= MAX_PATH)
|
if (strlcat(cuepath, slash, MAX_PATH) >= MAX_PATH)
|
||||||
goto skip; /* overflow */
|
goto skip; /* overflow */
|
||||||
char *dot = strrchr(cuepath, '.');
|
char *dot = strrchr(cuepath, '.');
|
||||||
strcpy(dot, ".cue");
|
strcpy(dot, ".cue");
|
||||||
if (!file_exists(cuepath))
|
if (!file_exists(cuepath))
|
||||||
|
@ -305,7 +305,7 @@ bool parse_cuesheet(struct cuesheet_file *cue_file, struct cuesheet *cue)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dest)
|
if (dest)
|
||||||
{
|
{
|
||||||
if (char_enc == CHAR_ENC_ISO_8859_1)
|
if (char_enc == CHAR_ENC_ISO_8859_1)
|
||||||
{
|
{
|
||||||
|
@ -317,7 +317,7 @@ bool parse_cuesheet(struct cuesheet_file *cue_file, struct cuesheet *cue)
|
||||||
{
|
{
|
||||||
strlcpy(dest, string, count);
|
strlcpy(dest, string, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (is_embedded)
|
if (is_embedded)
|
||||||
{
|
{
|
||||||
|
@ -505,7 +505,7 @@ bool display_cuesheet_content(char* filename)
|
||||||
bool curr_cuesheet_skip(struct cuesheet *cue, int direction, unsigned long curr_pos)
|
bool curr_cuesheet_skip(struct cuesheet *cue, int direction, unsigned long curr_pos)
|
||||||
{
|
{
|
||||||
int track = cue_find_current_track(cue, curr_pos);
|
int track = cue_find_current_track(cue, curr_pos);
|
||||||
|
|
||||||
if (direction >= 0 && track == cue->track_count - 1)
|
if (direction >= 0 && track == cue->track_count - 1)
|
||||||
{
|
{
|
||||||
/* we want to get out of the cuesheet */
|
/* we want to get out of the cuesheet */
|
||||||
|
@ -520,7 +520,7 @@ bool curr_cuesheet_skip(struct cuesheet *cue, int direction, unsigned long curr_
|
||||||
to previous cuesheet segment. If skipping backward after
|
to previous cuesheet segment. If skipping backward after
|
||||||
DEFAULT_SKIP_TRESH seconds have elapsed, skip to the start of the
|
DEFAULT_SKIP_TRESH seconds have elapsed, skip to the start of the
|
||||||
current cuesheet segment */
|
current cuesheet segment */
|
||||||
if (direction == 1 ||
|
if (direction == 1 ||
|
||||||
((curr_pos - cue->tracks[track].offset) < DEFAULT_SKIP_TRESH))
|
((curr_pos - cue->tracks[track].offset) < DEFAULT_SKIP_TRESH))
|
||||||
{
|
{
|
||||||
track += direction;
|
track += direction;
|
||||||
|
|
|
@ -60,7 +60,7 @@ static const char *option_get_timestring(char *buf, int buf_len,
|
||||||
/* these two vars are needed so arbitrary values can be added to the
|
/* these two vars are needed so arbitrary values can be added to the
|
||||||
TABLE_SETTING settings if the F_ALLOW_ARBITRARY_VALS flag is set */
|
TABLE_SETTING settings if the F_ALLOW_ARBITRARY_VALS flag is set */
|
||||||
static int table_setting_oldval = 0, table_setting_array_position = 0;
|
static int table_setting_oldval = 0, table_setting_array_position = 0;
|
||||||
const char *option_get_valuestring(const struct settings_list *setting,
|
const char *option_get_valuestring(const struct settings_list *setting,
|
||||||
char *buffer, int buf_len,
|
char *buffer, int buf_len,
|
||||||
intptr_t temp_var)
|
intptr_t temp_var)
|
||||||
{
|
{
|
||||||
|
@ -202,7 +202,7 @@ void option_talk_value(const struct settings_list *setting, int value, bool enqu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int option_talk(int selected_item, void * data)
|
static int option_talk(int selected_item, void * data)
|
||||||
{
|
{
|
||||||
struct settings_list *setting = (struct settings_list *)data;
|
struct settings_list *setting = (struct settings_list *)data;
|
||||||
|
@ -320,7 +320,7 @@ static int selection_to_val(const struct settings_list *setting, int selection)
|
||||||
else if ((setting->flags & F_TABLE_SETTING) == F_TABLE_SETTING)
|
else if ((setting->flags & F_TABLE_SETTING) == F_TABLE_SETTING)
|
||||||
{
|
{
|
||||||
const struct table_setting *info = setting->table_setting;
|
const struct table_setting *info = setting->table_setting;
|
||||||
if (setting->flags&F_ALLOW_ARBITRARY_VALS &&
|
if (setting->flags&F_ALLOW_ARBITRARY_VALS &&
|
||||||
table_setting_array_position != -1 &&
|
table_setting_array_position != -1 &&
|
||||||
(selection >= table_setting_array_position))
|
(selection >= table_setting_array_position))
|
||||||
{
|
{
|
||||||
|
@ -361,7 +361,7 @@ static int selection_to_val(const struct settings_list *setting, int selection)
|
||||||
return max- (selection * step);
|
return max- (selection * step);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char * value_setting_get_name_cb(int selected_item,
|
static const char * value_setting_get_name_cb(int selected_item,
|
||||||
void * data,
|
void * data,
|
||||||
char *buffer,
|
char *buffer,
|
||||||
size_t buffer_len)
|
size_t buffer_len)
|
||||||
|
@ -492,16 +492,16 @@ bool option_screen(const struct settings_list *setting,
|
||||||
title = (char*)setting->cfg_vals;
|
title = (char*)setting->cfg_vals;
|
||||||
else
|
else
|
||||||
title = P2STR(option_title);
|
title = P2STR(option_title);
|
||||||
|
|
||||||
gui_synclist_set_title(&lists, title, Icon_Questionmark);
|
gui_synclist_set_title(&lists, title, Icon_Questionmark);
|
||||||
gui_synclist_set_icon_callback(&lists, NULL);
|
gui_synclist_set_icon_callback(&lists, NULL);
|
||||||
if(global_settings.talk_menu)
|
if(global_settings.talk_menu)
|
||||||
gui_synclist_set_voice_callback(&lists, option_talk);
|
gui_synclist_set_voice_callback(&lists, option_talk);
|
||||||
|
|
||||||
val_to_selection(setting, oldvalue, &nb_items, &selected, &function);
|
val_to_selection(setting, oldvalue, &nb_items, &selected, &function);
|
||||||
gui_synclist_set_nb_items(&lists, nb_items);
|
gui_synclist_set_nb_items(&lists, nb_items);
|
||||||
gui_synclist_select_item(&lists, selected);
|
gui_synclist_select_item(&lists, selected);
|
||||||
|
|
||||||
gui_synclist_limit_scroll(&lists, true);
|
gui_synclist_limit_scroll(&lists, true);
|
||||||
gui_synclist_draw(&lists);
|
gui_synclist_draw(&lists);
|
||||||
/* talk the item */
|
/* talk the item */
|
||||||
|
@ -551,7 +551,7 @@ bool option_screen(const struct settings_list *setting,
|
||||||
{
|
{
|
||||||
if (var_type == F_T_INT || var_type == F_T_UINT)
|
if (var_type == F_T_INT || var_type == F_T_UINT)
|
||||||
*(int*)setting->setting = *variable;
|
*(int*)setting->setting = *variable;
|
||||||
else
|
else
|
||||||
*(bool*)setting->setting = (*variable==1);
|
*(bool*)setting->setting = (*variable==1);
|
||||||
}
|
}
|
||||||
settings_save();
|
settings_save();
|
||||||
|
|
12
apps/menu.c
12
apps/menu.c
|
@ -68,7 +68,7 @@ static int current_subitems_count = 0;
|
||||||
static int talk_menu_item(int selected_item, void *data);
|
static int talk_menu_item(int selected_item, void *data);
|
||||||
|
|
||||||
static void get_menu_callback(const struct menu_item_ex *m,
|
static void get_menu_callback(const struct menu_item_ex *m,
|
||||||
menu_callback_type *menu_callback)
|
menu_callback_type *menu_callback)
|
||||||
{
|
{
|
||||||
if (m->flags&(MENU_HAS_DESC|MENU_DYNAMIC_DESC))
|
if (m->flags&(MENU_HAS_DESC|MENU_DYNAMIC_DESC))
|
||||||
*menu_callback= m->callback_and_desc->menu_callback;
|
*menu_callback= m->callback_and_desc->menu_callback;
|
||||||
|
@ -340,7 +340,7 @@ void do_setting_screen(const struct settings_list *setting, const char * title,
|
||||||
option_screen((struct settings_list *)setting, parent,
|
option_screen((struct settings_list *)setting, parent,
|
||||||
setting->flags&F_TEMPVAR, (char*)title);
|
setting->flags&F_TEMPVAR, (char*)title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void do_setting_from_menu(const struct menu_item_ex *temp,
|
void do_setting_from_menu(const struct menu_item_ex *temp,
|
||||||
struct viewport parent[NB_SCREENS])
|
struct viewport parent[NB_SCREENS])
|
||||||
|
@ -501,12 +501,12 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
||||||
ID2P(LANG_RIGHT_QS_ITEM),
|
ID2P(LANG_RIGHT_QS_ITEM),
|
||||||
ID2P(LANG_ADD_TO_FAVES));
|
ID2P(LANG_ADD_TO_FAVES));
|
||||||
#endif
|
#endif
|
||||||
MENUITEM_STRINGLIST(notquickscreen_able_option,
|
MENUITEM_STRINGLIST(notquickscreen_able_option,
|
||||||
ID2P(LANG_ONPLAY_MENU_TITLE), NULL,
|
ID2P(LANG_ONPLAY_MENU_TITLE), NULL,
|
||||||
ID2P(LANG_RESET_SETTING));
|
ID2P(LANG_RESET_SETTING));
|
||||||
const struct menu_item_ex *menu;
|
const struct menu_item_ex *menu;
|
||||||
int menu_selection = 0;
|
int menu_selection = 0;
|
||||||
const struct settings_list *setting =
|
const struct settings_list *setting =
|
||||||
find_setting(temp->variable, NULL);
|
find_setting(temp->variable, NULL);
|
||||||
#ifdef HAVE_QUICKSCREEN
|
#ifdef HAVE_QUICKSCREEN
|
||||||
if (is_setting_quickscreenable(setting))
|
if (is_setting_quickscreenable(setting))
|
||||||
|
@ -574,7 +574,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
||||||
if (!exiting_menu && (menu->flags&MENU_EXITAFTERTHISMENU))
|
if (!exiting_menu && (menu->flags&MENU_EXITAFTERTHISMENU))
|
||||||
done = true;
|
done = true;
|
||||||
else
|
else
|
||||||
init_menu_lists(menu, &lists,
|
init_menu_lists(menu, &lists,
|
||||||
menu_stack_selected_item[stack_top], false, vps);
|
menu_stack_selected_item[stack_top], false, vps);
|
||||||
redraw_lists = true;
|
redraw_lists = true;
|
||||||
/* new menu, so reload the callback */
|
/* new menu, so reload the callback */
|
||||||
|
@ -688,7 +688,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
||||||
init_menu_lists(menu,&lists,selected,true,vps);
|
init_menu_lists(menu,&lists,selected,true,vps);
|
||||||
/* callback was changed, so reload the menu's callback */
|
/* callback was changed, so reload the menu's callback */
|
||||||
get_menu_callback(menu, &menu_callback);
|
get_menu_callback(menu, &menu_callback);
|
||||||
if ((menu->flags&MENU_EXITAFTERTHISMENU) &&
|
if ((menu->flags&MENU_EXITAFTERTHISMENU) &&
|
||||||
!(temp->flags&MENU_EXITAFTERTHISMENU))
|
!(temp->flags&MENU_EXITAFTERTHISMENU))
|
||||||
{
|
{
|
||||||
done = true;
|
done = true;
|
||||||
|
|
|
@ -98,7 +98,7 @@ struct playlist_viewer {
|
||||||
int selected_track; /* The selected track, relative (first is 0) */
|
int selected_track; /* The selected track, relative (first is 0) */
|
||||||
int moving_track; /* The track to move, relative (first is 0)
|
int moving_track; /* The track to move, relative (first is 0)
|
||||||
or -1 if nothing is currently being moved */
|
or -1 if nothing is currently being moved */
|
||||||
int moving_playlist_index; /* Playlist-relative index (as opposed to
|
int moving_playlist_index; /* Playlist-relative index (as opposed to
|
||||||
viewer-relative index) of moving track */
|
viewer-relative index) of moving track */
|
||||||
struct playlist_buffer buffer;
|
struct playlist_buffer buffer;
|
||||||
};
|
};
|
||||||
|
@ -295,7 +295,7 @@ static struct playlist_entry * playlist_buffer_get_track(struct playlist_buffer
|
||||||
the name_buffer is probably too small to store enough
|
the name_buffer is probably too small to store enough
|
||||||
titles to fill the screen, and preload data in the short
|
titles to fill the screen, and preload data in the short
|
||||||
direction.
|
direction.
|
||||||
|
|
||||||
If this happens then scrolling performance will probably
|
If this happens then scrolling performance will probably
|
||||||
be quite low, but it's better then having Data Abort errors */
|
be quite low, but it's better then having Data Abort errors */
|
||||||
playlist_buffer_load_entries(pb, index, FORWARD);
|
playlist_buffer_load_entries(pb, index, FORWARD);
|
||||||
|
@ -319,7 +319,7 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer,
|
||||||
}
|
}
|
||||||
if (!have_list && (playlist_amount() > 0))
|
if (!have_list && (playlist_amount() > 0))
|
||||||
{
|
{
|
||||||
/*If dynamic playlist still exists, view it anyway even
|
/*If dynamic playlist still exists, view it anyway even
|
||||||
if playback has reached the end of the playlist */
|
if playback has reached the end of the playlist */
|
||||||
have_list = true;
|
have_list = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ static void encrypt_buffer(char *buf, size_t size, uint32_t *key);
|
||||||
static void decrypt_buffer(char *buf, size_t size, uint32_t *key);
|
static void decrypt_buffer(char *buf, size_t size, uint32_t *key);
|
||||||
|
|
||||||
/* the following two functions are the reference TEA implementation by
|
/* the following two functions are the reference TEA implementation by
|
||||||
David Wheeler and Roger Needham taken from
|
David Wheeler and Roger Needham taken from
|
||||||
http://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm */
|
http://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm */
|
||||||
|
|
||||||
static void do_encrypt(uint32_t* v, uint32_t* k)
|
static void do_encrypt(uint32_t* v, uint32_t* k)
|
||||||
|
|
|
@ -428,8 +428,8 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i)
|
||||||
int nword;
|
int nword;
|
||||||
int word_count, word_width;
|
int word_count, word_width;
|
||||||
const unsigned char *str;
|
const unsigned char *str;
|
||||||
}
|
}
|
||||||
sp,
|
sp,
|
||||||
cr;
|
cr;
|
||||||
|
|
||||||
lrc_buffer_used = (lrc_buffer_used+3)&~3; /* 4 bytes aligned */
|
lrc_buffer_used = (lrc_buffer_used+3)&~3; /* 4 bytes aligned */
|
||||||
|
|
|
@ -171,7 +171,7 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
struct gui_synclist list;
|
struct gui_synclist list;
|
||||||
bool done = false;
|
bool done = false;
|
||||||
int action, cur_sel;
|
int action, cur_sel;
|
||||||
|
|
||||||
menu_table = rb->root_menu_get_options(&menu_item_count);
|
menu_table = rb->root_menu_get_options(&menu_item_count);
|
||||||
load_from_cfg();
|
load_from_cfg();
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@ static bool custom_dir(void)
|
||||||
rb->close(fd2);
|
rb->close(fd2);
|
||||||
if(errors)
|
if(errors)
|
||||||
/* Press button to continue */
|
/* Press button to continue */
|
||||||
rb->get_action(CONTEXT_STD, TIMEOUT_BLOCK);
|
rb->get_action(CONTEXT_STD, TIMEOUT_BLOCK);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
@ -259,11 +259,11 @@ static int load_list(void)
|
||||||
{
|
{
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
rb->read(myfd,buffer,buffer_size);
|
rb->read(myfd,buffer,buffer_size);
|
||||||
rb->close(myfd);
|
rb->close(myfd);
|
||||||
list = (struct file_format *)buffer;
|
list = (struct file_format *)buffer;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ static int save_list(void)
|
||||||
rb->lseek(myfd,0,SEEK_SET);
|
rb->lseek(myfd,0,SEEK_SET);
|
||||||
rb->write(myfd,&dirs_count,sizeof(int));
|
rb->write(myfd,&dirs_count,sizeof(int));
|
||||||
rb->close(myfd);
|
rb->close(myfd);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,22 +298,22 @@ static int edit_list(void)
|
||||||
bool exit = false;
|
bool exit = false;
|
||||||
int button,i;
|
int button,i;
|
||||||
int selection, ret = 0;
|
int selection, ret = 0;
|
||||||
|
|
||||||
/* load the dat file if not already done */
|
/* load the dat file if not already done */
|
||||||
if ((list == NULL || list->count == 0) && (i = load_list()) != 0)
|
if ((list == NULL || list->count == 0) && (i = load_list()) != 0)
|
||||||
{
|
{
|
||||||
rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i);
|
rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
dirs_count = list->count;
|
dirs_count = list->count;
|
||||||
|
|
||||||
rb->gui_synclist_init(&lists,list_get_name_cb,0, false, 1, NULL);
|
rb->gui_synclist_init(&lists,list_get_name_cb,0, false, 1, NULL);
|
||||||
rb->gui_synclist_set_icon_callback(&lists,NULL);
|
rb->gui_synclist_set_icon_callback(&lists,NULL);
|
||||||
rb->gui_synclist_set_nb_items(&lists,list->count);
|
rb->gui_synclist_set_nb_items(&lists,list->count);
|
||||||
rb->gui_synclist_limit_scroll(&lists,true);
|
rb->gui_synclist_limit_scroll(&lists,true);
|
||||||
rb->gui_synclist_select_item(&lists, 0);
|
rb->gui_synclist_select_item(&lists, 0);
|
||||||
|
|
||||||
while (!exit)
|
while (!exit)
|
||||||
{
|
{
|
||||||
rb->gui_synclist_draw(&lists);
|
rb->gui_synclist_draw(&lists);
|
||||||
|
@ -387,22 +387,22 @@ static int export_list_to_file_text(void)
|
||||||
rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i);
|
rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->count <= 0)
|
if (list->count <= 0)
|
||||||
{
|
{
|
||||||
rb->splashf(HZ*2, "no dirs in list file: %s", RFA_FILE);
|
rb->splashf(HZ*2, "no dirs in list file: %s", RFA_FILE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create and open the file */
|
/* create and open the file */
|
||||||
int myfd = rb->creat(RFA_FILE_TEXT, 0666);
|
int myfd = rb->creat(RFA_FILE_TEXT, 0666);
|
||||||
if (myfd < 0)
|
if (myfd < 0)
|
||||||
{
|
{
|
||||||
rb->splashf(HZ*4, "failed to open: fd = %d, file = %s",
|
rb->splashf(HZ*4, "failed to open: fd = %d, file = %s",
|
||||||
myfd, RFA_FILE_TEXT);
|
myfd, RFA_FILE_TEXT);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* write each directory to file */
|
/* write each directory to file */
|
||||||
for (i = 0; i < list->count; i++)
|
for (i = 0; i < list->count; i++)
|
||||||
{
|
{
|
||||||
|
@ -411,7 +411,7 @@ static int export_list_to_file_text(void)
|
||||||
rb->fdprintf(myfd, "%s\n", list->folder[i]);
|
rb->fdprintf(myfd, "%s\n", list->folder[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rb->close(myfd);
|
rb->close(myfd);
|
||||||
rb->splash(HZ, "Done");
|
rb->splash(HZ, "Done");
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -420,7 +420,7 @@ static int export_list_to_file_text(void)
|
||||||
static int import_list_from_file_text(void)
|
static int import_list_from_file_text(void)
|
||||||
{
|
{
|
||||||
char line[MAX_PATH];
|
char line[MAX_PATH];
|
||||||
|
|
||||||
buffer = rb->plugin_get_audio_buffer(&buffer_size);
|
buffer = rb->plugin_get_audio_buffer(&buffer_size);
|
||||||
if (buffer == NULL)
|
if (buffer == NULL)
|
||||||
{
|
{
|
||||||
|
@ -434,11 +434,11 @@ static int import_list_from_file_text(void)
|
||||||
rb->splashf(HZ*2, "failed to open: %s", RFA_FILE_TEXT);
|
rb->splashf(HZ*2, "failed to open: %s", RFA_FILE_TEXT);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the list structure, and initialize count */
|
/* set the list structure, and initialize count */
|
||||||
list = (struct file_format *)buffer;
|
list = (struct file_format *)buffer;
|
||||||
list->count = 0;
|
list->count = 0;
|
||||||
|
|
||||||
while ((rb->read_line(myfd, line, MAX_PATH - 1)) > 0)
|
while ((rb->read_line(myfd, line, MAX_PATH - 1)) > 0)
|
||||||
{
|
{
|
||||||
/* copy the dir name, and skip the newline */
|
/* copy the dir name, and skip the newline */
|
||||||
|
@ -448,16 +448,16 @@ static int import_list_from_file_text(void)
|
||||||
{
|
{
|
||||||
if (line[len-1] == 0x0A || line[len-1] == 0x0D)
|
if (line[len-1] == 0x0A || line[len-1] == 0x0D)
|
||||||
line[len-1] = 0x00;
|
line[len-1] = 0x00;
|
||||||
if (len > 1 &&
|
if (len > 1 &&
|
||||||
(line[len-2] == 0x0A || line[len-2] == 0x0D))
|
(line[len-2] == 0x0A || line[len-2] == 0x0D))
|
||||||
line[len-2] = 0x00;
|
line[len-2] = 0x00;
|
||||||
}
|
}
|
||||||
|
|
||||||
rb->strcpy(list->folder[list->count++], line);
|
rb->strcpy(list->folder[list->count++], line);
|
||||||
}
|
}
|
||||||
|
|
||||||
rb->close(myfd);
|
rb->close(myfd);
|
||||||
|
|
||||||
if (list->count == 0)
|
if (list->count == 0)
|
||||||
{
|
{
|
||||||
load_list();
|
load_list();
|
||||||
|
@ -484,14 +484,14 @@ static int start_shuffled_play(void)
|
||||||
rb->splashf(HZ*2, "Not enough memory for shuffling");
|
rb->splashf(HZ*2, "Not enough memory for shuffling");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* load the dat file if not already done */
|
/* load the dat file if not already done */
|
||||||
if ((list == NULL || list->count == 0) && (i = load_list()) != 0)
|
if ((list == NULL || list->count == 0) && (i = load_list()) != 0)
|
||||||
{
|
{
|
||||||
rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i);
|
rb->splashf(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list->count <= 0)
|
if (list->count <= 0)
|
||||||
{
|
{
|
||||||
rb->splashf(HZ*2, "no dirs in list file: %s", RFA_FILE);
|
rb->splashf(HZ*2, "no dirs in list file: %s", RFA_FILE);
|
||||||
|
@ -507,7 +507,7 @@ static int start_shuffled_play(void)
|
||||||
}
|
}
|
||||||
for(i=0;i<list->count;i++)
|
for(i=0;i<list->count;i++)
|
||||||
order[i]=i;
|
order[i]=i;
|
||||||
|
|
||||||
for(i = list->count - 1; i >= 0; i--)
|
for(i = list->count - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
/* the rand is from 0 to RAND_MAX, so adjust to our value range */
|
/* the rand is from 0 to RAND_MAX, so adjust to our value range */
|
||||||
|
@ -518,7 +518,7 @@ static int start_shuffled_play(void)
|
||||||
order[candidate] = order[i];
|
order[candidate] = order[i];
|
||||||
order[i] = store;
|
order[i] = store;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We don't want whatever is playing */
|
/* We don't want whatever is playing */
|
||||||
if (!(rb->playlist_remove_all_tracks(NULL) == 0
|
if (!(rb->playlist_remove_all_tracks(NULL) == 0
|
||||||
&& rb->playlist_create(NULL, NULL) == 0))
|
&& rb->playlist_create(NULL, NULL) == 0))
|
||||||
|
@ -643,6 +643,6 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cancel = false;
|
cancel = false;
|
||||||
|
|
||||||
return main_menu();
|
return main_menu();
|
||||||
}
|
}
|
||||||
|
|
26
apps/tree.c
26
apps/tree.c
|
@ -128,7 +128,7 @@ static const char* tree_get_filename(int selected_item, void *data,
|
||||||
{
|
{
|
||||||
return tagtree_get_entry_name(&tc, selected_item, buffer, buffer_len);
|
return tagtree_get_entry_name(&tc, selected_item, buffer, buffer_len);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
struct entry *entry = tree_get_entry_at(local_tc, selected_item);
|
struct entry *entry = tree_get_entry_at(local_tc, selected_item);
|
||||||
|
@ -137,7 +137,7 @@ static const char* tree_get_filename(int selected_item, void *data,
|
||||||
name = entry->name;
|
name = entry->name;
|
||||||
attr = entry->attr;
|
attr = entry->attr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(attr & ATTR_DIRECTORY))
|
if(!(attr & ATTR_DIRECTORY))
|
||||||
{
|
{
|
||||||
switch(global_settings.show_filename_ext)
|
switch(global_settings.show_filename_ext)
|
||||||
|
@ -363,7 +363,7 @@ static int update_dir(void)
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
tc.sort_dir = global_settings.sort_dir;
|
tc.sort_dir = global_settings.sort_dir;
|
||||||
|
@ -391,7 +391,7 @@ static int update_dir(void)
|
||||||
{
|
{
|
||||||
if(
|
if(
|
||||||
#ifdef HAVE_TAGCACHE
|
#ifdef HAVE_TAGCACHE
|
||||||
!id3db &&
|
!id3db &&
|
||||||
#endif
|
#endif
|
||||||
tc.dirfull )
|
tc.dirfull )
|
||||||
{
|
{
|
||||||
|
@ -474,7 +474,7 @@ void resume_directory(const char *dir)
|
||||||
#ifdef HAVE_TAGCACHE
|
#ifdef HAVE_TAGCACHE
|
||||||
if (!id3db)
|
if (!id3db)
|
||||||
#endif
|
#endif
|
||||||
*tc.dirfilter = global_settings.dirfilter;
|
*tc.dirfilter = global_settings.dirfilter;
|
||||||
ret = ft_load(&tc, dir);
|
ret = ft_load(&tc, dir);
|
||||||
*tc.dirfilter = dirfilter;
|
*tc.dirfilter = dirfilter;
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
@ -534,7 +534,7 @@ char* get_current_file(char* buffer, size_t buffer_len)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allow apps to change our dirfilter directly (required for sub browsers)
|
/* Allow apps to change our dirfilter directly (required for sub browsers)
|
||||||
if they're suddenly going to become a file browser for example */
|
if they're suddenly going to become a file browser for example */
|
||||||
void set_dirfilter(int l_dirfilter)
|
void set_dirfilter(int l_dirfilter)
|
||||||
{
|
{
|
||||||
|
@ -712,7 +712,7 @@ static int dirbrowse(void)
|
||||||
#endif
|
#endif
|
||||||
if (ft_exit(&tc) == 3)
|
if (ft_exit(&tc) == 3)
|
||||||
exit_func = true;
|
exit_func = true;
|
||||||
|
|
||||||
restore = true;
|
restore = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -976,7 +976,7 @@ int rockbox_browse(struct browse_context *browse)
|
||||||
browse->root, browse->selected);
|
browse->root, browse->selected);
|
||||||
set_current_file(current);
|
set_current_file(current);
|
||||||
/* set_current_file changes dirlevel, change it back */
|
/* set_current_file changes dirlevel, change it back */
|
||||||
tc.dirlevel = 0;
|
tc.dirlevel = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret_val = dirbrowse();
|
ret_val = dirbrowse();
|
||||||
|
@ -1100,7 +1100,7 @@ bool bookmark_play(char *resume_file, int index, unsigned long elapsed,
|
||||||
else search for it */
|
else search for it */
|
||||||
peek_filename = playlist_peek(index, filename_buf,
|
peek_filename = playlist_peek(index, filename_buf,
|
||||||
sizeof(filename_buf));
|
sizeof(filename_buf));
|
||||||
|
|
||||||
if (peek_filename == NULL)
|
if (peek_filename == NULL)
|
||||||
{
|
{
|
||||||
/* playlist has shrunk, search from the top */
|
/* playlist has shrunk, search from the top */
|
||||||
|
@ -1110,7 +1110,7 @@ bool bookmark_play(char *resume_file, int index, unsigned long elapsed,
|
||||||
if (peek_filename == NULL)
|
if (peek_filename == NULL)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(strrchr(peek_filename, '/') + 1, filename))
|
if (strcmp(strrchr(peek_filename, '/') + 1, filename))
|
||||||
{
|
{
|
||||||
for ( i=0; i < playlist_amount(); i++ )
|
for ( i=0; i < playlist_amount(); i++ )
|
||||||
|
@ -1209,7 +1209,7 @@ void tree_flush(void)
|
||||||
global_status.dircache_size = info.last_size;
|
global_status.dircache_size = info.last_size;
|
||||||
#ifdef HAVE_EEPROM_SETTINGS
|
#ifdef HAVE_EEPROM_SETTINGS
|
||||||
savecache = firmware_settings.initialized;
|
savecache = firmware_settings.initialized;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1231,11 +1231,11 @@ void tree_restore(void)
|
||||||
#ifdef HAVE_EEPROM_SETTINGS
|
#ifdef HAVE_EEPROM_SETTINGS
|
||||||
firmware_settings.disk_clean = false;
|
firmware_settings.disk_clean = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_TC_RAMCACHE
|
#ifdef HAVE_TC_RAMCACHE
|
||||||
remove(TAGCACHE_STATEFILE);
|
remove(TAGCACHE_STATEFILE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_DIRCACHE
|
#ifdef HAVE_DIRCACHE
|
||||||
if (global_settings.dircache && dircache_resume() > 0)
|
if (global_settings.dircache && dircache_resume() > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -316,7 +316,7 @@
|
||||||
remote scroll step
|
remote scroll step
|
||||||
& 1 to 160 & N/A\\
|
& 1 to 160 & N/A\\
|
||||||
remote scroll delay
|
remote scroll delay
|
||||||
& 0 to 2500 & ms\\
|
& 0 to 2500 & ms\\
|
||||||
remote bidir limit
|
remote bidir limit
|
||||||
& 0 to 200 & N/A\\
|
& 0 to 200 & N/A\\
|
||||||
backlight filters first remote keypress
|
backlight filters first remote keypress
|
||||||
|
|
Loading…
Reference in New Issue