summaryrefslogtreecommitdiff
path: root/src/fs/virtfstools.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-28 22:49:10 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-28 22:49:10 +0300
commitdb31c2f832dd4067e4670dd469fe3b696188576b (patch)
tree7ed857adddd833cfd5087ee6c22e408637301c5c /src/fs/virtfstools.cpp
parent6583c1a039a28a41a865b02598e6da9521046325 (diff)
downloadManaVerse-db31c2f832dd4067e4670dd469fe3b696188576b.tar.gz
ManaVerse-db31c2f832dd4067e4670dd469fe3b696188576b.tar.bz2
ManaVerse-db31c2f832dd4067e4670dd469fe3b696188576b.tar.xz
ManaVerse-db31c2f832dd4067e4670dd469fe3b696188576b.zip
Add configure flag for use physfs.
New configure option: --without-physfs For now manaplus cant be compiled without physfs.
Diffstat (limited to 'src/fs/virtfstools.cpp')
-rw-r--r--src/fs/virtfstools.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/fs/virtfstools.cpp b/src/fs/virtfstools.cpp
index c9e976864..39f1ed413 100644
--- a/src/fs/virtfstools.cpp
+++ b/src/fs/virtfstools.cpp
@@ -224,34 +224,36 @@ namespace VirtFs
}
} // namespace VirtFs
+#ifdef USE_PHYSFS
// +++ temporary add it here
-namespace VirtFsDir
+namespace VirtFsPhys
{
void getFiles(const std::string &path,
StringVect &list)
{
- VirtList *const fonts = VirtFsDir::enumerateFiles(path);
+ VirtList *const fonts = VirtFsPhys::enumerateFiles(path);
FOR_EACH (StringVectCIter, i, fonts->names)
{
- if (!VirtFsDir::isDirectory(path + dirSeparator + *i))
+ if (!VirtFsPhys::isDirectory(path + dirSeparator + *i))
list.push_back(*i);
}
- VirtFsDir::freeList(fonts);
+ VirtFsPhys::freeList(fonts);
}
} // namespace VirtFs
-
+#else // USE_PHYSFS
// +++ temporary add it here
-namespace VirtFsPhys
+namespace VirtFsDir
{
void getFiles(const std::string &path,
StringVect &list)
{
- VirtList *const fonts = VirtFsPhys::enumerateFiles(path);
+ VirtList *const fonts = VirtFsDir::enumerateFiles(path);
FOR_EACH (StringVectCIter, i, fonts->names)
{
- if (!VirtFsPhys::isDirectory(path + dirSeparator + *i))
+ if (!VirtFsDir::isDirectory(path + dirSeparator + *i))
list.push_back(*i);
}
- VirtFsPhys::freeList(fonts);
+ VirtFsDir::freeList(fonts);
}
} // namespace VirtFs
+#endif // USE_PHYSFS