From a50cc0bd343e393705174cb9fb1662b599da1a4c Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Mon, 17 Jan 2005 12:56:00 +0000 Subject: Minor tweaks to compile on win32. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5578 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apps/tree.c') 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) 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); -- cgit v1.2.3