added support for wchar_t file paths and more stable windows builds

This commit is contained in:
Jack Andersen
2015-07-22 08:59:40 -10:00
parent 602f6b6e15
commit 5d3dcb57ad
7 changed files with 73 additions and 9 deletions

View File

@@ -14,6 +14,9 @@ class FileReader : public IStreamReader
{
public:
FileReader(const std::string& filename, atInt32 cacheSize = (32 * 1024));
#if _WIN32
FileReader(const std::wstring& filename, atInt32 cacheSize = (32 * 1024));
#endif
virtual ~FileReader();
inline const std::string& filename() const
{return m_filename;}
@@ -31,6 +34,9 @@ public:
void setCacheSize(const atInt32 blockSize);
protected:
std::string m_filename;
#if _WIN32
std::wstring m_wfilename;
#endif
FILE* m_fileHandle;
std::unique_ptr<atUint8[]> m_cacheData;
atInt32 m_blockSize;