diff options
| author | oy <Tom_Adams@web.de> | 2010-09-24 13:38:03 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-09-24 13:38:03 +0200 |
| commit | 7e0b37e06c71dc96d68f3352ecd2c799caaaf8ec (patch) | |
| tree | b76100af28ae1fecb480ff02ae42f24507e92d06 /src/game/client/components | |
| parent | 1cbf731fc0c3cbc5a1d2be6f1af51cb93d9739e2 (diff) | |
| download | zcatch-7e0b37e06c71dc96d68f3352ecd2c799caaaf8ec.tar.gz zcatch-7e0b37e06c71dc96d68f3352ecd2c799caaaf8ec.zip | |
fixed that it checks the current dir for demos too
Diffstat (limited to 'src/game/client/components')
| -rw-r--r-- | src/game/client/components/menus.h | 3 | ||||
| -rw-r--r-- | src/game/client/components/menus_demo.cpp | 7 | ||||
| -rw-r--r-- | src/game/client/components/skins.cpp | 2 | ||||
| -rw-r--r-- | src/game/client/components/skins.h | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/game/client/components/menus.h b/src/game/client/components/menus.h index 1d9591bd..2fb53d13 100644 --- a/src/game/client/components/menus.h +++ b/src/game/client/components/menus.h @@ -167,8 +167,7 @@ class CMenus : public CComponent bool m_DemolistDelEntry; void DemolistPopulate(); - static void DemolistCountCallback(const char *pName, int IsDir, void *pUser); - static void DemolistFetchCallback(const char *pName, int IsDir, void *pUser); + static void DemolistFetchCallback(const char *pName, int IsDir, int DirType, void *pUser); // found in menus.cpp int Render(); diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index b64936ec..abe59094 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -408,7 +408,7 @@ int CMenus::UiDoListboxEnd(float *pScrollValue, bool *pItemActivated) return gs_ListBoxNewSelected; } -void CMenus::DemolistFetchCallback(const char *pName, int IsDir, void *pUser) +void CMenus::DemolistFetchCallback(const char *pName, int IsDir, int DirType, void *pUser) { if(pName[0] == '.') return; @@ -416,7 +416,8 @@ void CMenus::DemolistFetchCallback(const char *pName, int IsDir, void *pUser) CMenus *pSelf = (CMenus *)pUser; CDemoItem Item; - str_format(Item.m_aFilename, sizeof(Item.m_aFilename), "%s/%s/%s", pSelf->Client()->UserDirectory(), pSelf->m_aCurrentDemoFolder, pName); + str_format(Item.m_aFilename, sizeof(Item.m_aFilename), "%s%s%s/%s", pSelf->Storage()->GetDirectory(DirType), + pSelf->Storage()->GetDirectory(DirType)[0] ? "/" : "", pSelf->m_aCurrentDemoFolder, pName); str_copy(Item.m_aName, pName, sizeof(Item.m_aName)); pSelf->m_lDemos.add(Item); } @@ -433,7 +434,7 @@ void CMenus::DemolistPopulate() m_lDemos.add(Item); } - Storage()->ListDirectory(IStorage::TYPE_SAVE, m_aCurrentDemoFolder, DemolistFetchCallback, this); + Storage()->ListDirectory(IStorage::TYPE_SAVE|IStorage::TYPE_CURRENT, m_aCurrentDemoFolder, DemolistFetchCallback, this); } diff --git a/src/game/client/components/skins.cpp b/src/game/client/components/skins.cpp index 757c2008..098111ee 100644 --- a/src/game/client/components/skins.cpp +++ b/src/game/client/components/skins.cpp @@ -10,7 +10,7 @@ #include "skins.h" -void CSkins::SkinScan(const char *pName, int IsDir, void *pUser) +void CSkins::SkinScan(const char *pName, int IsDir, int DirType, void *pUser) { CSkins *pSelf = (CSkins *)pUser; int l = str_length(pName); diff --git a/src/game/client/components/skins.h b/src/game/client/components/skins.h index e1000e3a..9568e793 100644 --- a/src/game/client/components/skins.h +++ b/src/game/client/components/skins.h @@ -28,6 +28,6 @@ public: private: sorted_array<CSkin> m_aSkins; - static void SkinScan(const char *pName, int IsDir, void *pUser); + static void SkinScan(const char *pName, int IsDir, int DirType, void *pUser); }; #endif |