From 204960c8ee29bca2a2e07a55b6bbffb1c315fb73 Mon Sep 17 00:00:00 2001 From: janwas Date: Sun, 27 Mar 2005 01:47:36 +0000 Subject: [PATCH] add vfs_init, shorten load timeslice This was SVN commit r2059. --- source/main.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/source/main.cpp b/source/main.cpp index 7d809dad70..7e7e64a093 100755 --- a/source/main.cpp +++ b/source/main.cpp @@ -775,10 +775,23 @@ TIMER(InitVfs) // display_startup_error(L"error setting current directory.\n"\ // L"argv[0] is probably incorrect. please start the game via command-line."); + { + TIMER(VFS_INIT); + vfs_init(); vfs_mount("", "mods/official", VFS_MOUNT_RECURSIVE|VFS_MOUNT_ARCHIVES); vfs_mount("screenshots/", "screenshots"); vfs_mount("profiles/", "profiles"); - + } +/* + double t0 = get_time(); + for(int i = 0; i < 30*4*5; i++) + { + TIMER(rebuild); + vfs_rebuild(); + } + debug_out("%f\n\n\n", get_time()-t0); + exit(1134); +/**/ // don't try vfs_display yet: SDL_Init hasn't yet redirected stdout } @@ -949,7 +962,7 @@ static int ProgressiveLoad() { wchar_t description[100]; int progress_percent; - int ret = LDR_ProgressiveLoad(100e-3, description, ARRAY_SIZE(description), &progress_percent); + int ret = LDR_ProgressiveLoad(10e-3, description, ARRAY_SIZE(description), &progress_percent); switch(ret) { // no load active => no-op (skip code below)