summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2005-01-17 12:56:00 +0000
committerBjörn Stenberg <bjorn@haxx.se>2005-01-17 12:56:00 +0000
commita50cc0bd343e393705174cb9fb1662b599da1a4c (patch)
treeca3fe0e2c14d7c3188cde77cbdfae2f26582df11 /apps/tree.c
parentb2d84b1607e38aaec4be56490b5194f64f1007ab (diff)
downloadrockbox-a50cc0bd343e393705174cb9fb1662b599da1a4c.tar.gz
rockbox-a50cc0bd343e393705174cb9fb1662b599da1a4c.zip
Minor tweaks to compile on win32.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5578 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/tree.c b/apps/tree.c
index eb1f7c3b74..b844060322 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -246,6 +246,8 @@ static int showdir(void)
246 int i; 246 int i;
247 int tree_max_on_screen; 247 int tree_max_on_screen;
248 bool dir_buffer_full = false; 248 bool dir_buffer_full = false;
249 int start = tc.dirstart;
250 bool id3db = global_settings.dirfilter == SHOW_ID3DB;
249 251
250#ifdef HAVE_LCD_BITMAP 252#ifdef HAVE_LCD_BITMAP
251 const char* icon; 253 const char* icon;
@@ -259,8 +261,6 @@ static int showdir(void)
259 int icon; 261 int icon;
260 tree_max_on_screen = TREE_MAX_ON_SCREEN; 262 tree_max_on_screen = TREE_MAX_ON_SCREEN;
261#endif 263#endif
262 int start = tc.dirstart;
263 bool id3db = global_settings.dirfilter == SHOW_ID3DB;
264 264
265 /* new file dir? load it */ 265 /* new file dir? load it */
266 if (id3db) { 266 if (id3db) {
@@ -1332,16 +1332,16 @@ bool rockbox_browse(const char *root, int dirfilter)
1332 1332
1333void tree_init(void) 1333void tree_init(void)
1334{ 1334{
1335 /* We copy the settings value in case it is changed by the user. We can't
1336 use it until the next reboot. */
1337 int max_files = global_settings.max_files_in_dir;
1338
1335 /* initialize tree context struct */ 1339 /* initialize tree context struct */
1336 memset(&tc, 0, sizeof(tc)); 1340 memset(&tc, 0, sizeof(tc));
1337 tc.dirfilter = &global_settings.dirfilter; 1341 tc.dirfilter = &global_settings.dirfilter;
1338 1342
1339 db_init(); 1343 db_init();
1340 1344
1341 /* We copy the settings value in case it is changed by the user. We can't
1342 use it until the next reboot. */
1343 int max_files = global_settings.max_files_in_dir;
1344
1345 tc.name_buffer_size = AVERAGE_FILENAME_LENGTH * max_files; 1345 tc.name_buffer_size = AVERAGE_FILENAME_LENGTH * max_files;
1346 tc.name_buffer = buffer_alloc(tc.name_buffer_size); 1346 tc.name_buffer = buffer_alloc(tc.name_buffer_size);
1347 1347