From 4d5443affa2cccfbf84afbd3790dcc105e5edef0 Mon Sep 17 00:00:00 2001 From: oy Date: Sun, 27 Mar 2011 16:42:47 +0200 Subject: added demo loading speed enhancement by MAP94. Closes #555 --- src/game/client/components/menus_demo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game') diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index 3d359178..94b315d7 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -457,7 +457,7 @@ int CMenus::DemolistFetchCallback(const char *pName, int IsDir, int StorageType, } Item.m_IsDir = IsDir != 0; Item.m_StorageType = StorageType; - pSelf->m_lDemos.add(Item); + pSelf->m_lDemos.add_unsorted(Item); return 0; } @@ -468,6 +468,7 @@ void CMenus::DemolistPopulate() if(!str_comp(m_aCurrentDemoFolder, "demos")) m_DemolistStorageType = IStorage::TYPE_ALL; Storage()->ListDirectory(m_DemolistStorageType, m_aCurrentDemoFolder, DemolistFetchCallback, this); + m_lDemos.sort_range(); } void CMenus::DemolistOnUpdate(bool Reset) -- cgit 1.4.1