Minor tweaks to compile on win32.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5578 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b2d84b1607
commit
a50cc0bd34
3 changed files with 9 additions and 8 deletions
|
@ -36,6 +36,7 @@
|
|||
#include "screens.h"
|
||||
#include "plugin.h"
|
||||
#include "rolo.h"
|
||||
#include "sprintf.h"
|
||||
|
||||
static int boot_size = 0;
|
||||
static int boot_cluster;
|
||||
|
@ -187,11 +188,11 @@ int ft_load(struct tree_context* c, bool *buffer_full)
|
|||
{
|
||||
extern char lastdir[]; /* from tree.c */
|
||||
int i;
|
||||
int name_buffer_used = 0;
|
||||
DIR *dir = opendir(c->currdir);
|
||||
if(!dir)
|
||||
return -1; /* not a directory */
|
||||
|
||||
int name_buffer_used = 0;
|
||||
c->dirsindir = 0;
|
||||
if (buffer_full)
|
||||
*buffer_full = false;
|
||||
|
|
|
@ -540,10 +540,10 @@ static int add_directory_to_playlist(struct playlist_info* playlist,
|
|||
int i;
|
||||
int dirfilter = global_settings.dirfilter;
|
||||
struct entry *files;
|
||||
struct tree_context* tc = tree_get_context();
|
||||
|
||||
/* use the tree browser dircache to load files */
|
||||
global_settings.dirfilter = SHOW_ALL;
|
||||
struct tree_context* tc = tree_get_context();
|
||||
strncpy(tc->currdir, dirname, sizeof(tc->currdir));
|
||||
num_files = ft_load(tc, NULL);
|
||||
files = (struct entry*) tc->dircache;
|
||||
|
|
12
apps/tree.c
12
apps/tree.c
|
@ -246,6 +246,8 @@ static int showdir(void)
|
|||
int i;
|
||||
int tree_max_on_screen;
|
||||
bool dir_buffer_full = false;
|
||||
int start = tc.dirstart;
|
||||
bool id3db = global_settings.dirfilter == SHOW_ID3DB;
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
const char* icon;
|
||||
|
@ -259,8 +261,6 @@ static int showdir(void)
|
|||
int icon;
|
||||
tree_max_on_screen = TREE_MAX_ON_SCREEN;
|
||||
#endif
|
||||
int start = tc.dirstart;
|
||||
bool id3db = global_settings.dirfilter == SHOW_ID3DB;
|
||||
|
||||
/* new file dir? load it */
|
||||
if (id3db) {
|
||||
|
@ -1332,16 +1332,16 @@ bool rockbox_browse(const char *root, int dirfilter)
|
|||
|
||||
void tree_init(void)
|
||||
{
|
||||
/* We copy the settings value in case it is changed by the user. We can't
|
||||
use it until the next reboot. */
|
||||
int max_files = global_settings.max_files_in_dir;
|
||||
|
||||
/* initialize tree context struct */
|
||||
memset(&tc, 0, sizeof(tc));
|
||||
tc.dirfilter = &global_settings.dirfilter;
|
||||
|
||||
db_init();
|
||||
|
||||
/* We copy the settings value in case it is changed by the user. We can't
|
||||
use it until the next reboot. */
|
||||
int max_files = global_settings.max_files_in_dir;
|
||||
|
||||
tc.name_buffer_size = AVERAGE_FILENAME_LENGTH * max_files;
|
||||
tc.name_buffer = buffer_alloc(tc.name_buffer_size);
|
||||
|
||||
|
|
Loading…
Reference in a new issue