mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Fix texture cache file name when rom name contains colon, #1477
This commit is contained in:
parent
45139a60d5
commit
1e3e06a036
|
@ -59,6 +59,7 @@ TxHiResCache::~TxHiResCache()
|
|||
if ((_options & DUMP_HIRESTEXCACHE) && !_haveCache && !_abortLoad) {
|
||||
/* dump cache to disk */
|
||||
tx_wstring filename = _ident + wst("_HIRESTEXTURES.") + TEXCACHE_EXT;
|
||||
removeColon(filename);
|
||||
tx_wstring cachepath(_path);
|
||||
cachepath += OSAL_DIR_SEPARATOR_STR;
|
||||
cachepath += wst("cache");
|
||||
|
@ -101,6 +102,7 @@ TxHiResCache::TxHiResCache(int maxwidth, int maxheight, int maxbpp, int options,
|
|||
if (_options & DUMP_HIRESTEXCACHE) {
|
||||
/* find it on disk */
|
||||
tx_wstring filename = _ident + wst("_HIRESTEXTURES.") + TEXCACHE_EXT;
|
||||
removeColon(filename);
|
||||
tx_wstring cachepath(_path);
|
||||
cachepath += OSAL_DIR_SEPARATOR_STR;
|
||||
cachepath += wst("cache");
|
||||
|
|
|
@ -39,6 +39,7 @@ TxTexCache::~TxTexCache()
|
|||
if (_options & DUMP_TEXCACHE) {
|
||||
/* dump cache to disk */
|
||||
tx_wstring filename = _ident + wst("_MEMORYCACHE.") + TEXCACHE_EXT;
|
||||
removeColon(filename);
|
||||
tx_wstring cachepath(_path);
|
||||
cachepath += OSAL_DIR_SEPARATOR_STR;
|
||||
cachepath += wst("cache");
|
||||
|
@ -61,6 +62,7 @@ TxTexCache::TxTexCache(int options, int cachesize, const wchar_t *path, const wc
|
|||
if (_options & DUMP_TEXCACHE) {
|
||||
/* find it on disk */
|
||||
tx_wstring filename = _ident + wst("_MEMORYCACHE.") + TEXCACHE_EXT;
|
||||
removeColon(filename);
|
||||
tx_wstring cachepath(_path);
|
||||
cachepath += OSAL_DIR_SEPARATOR_STR;
|
||||
cachepath += wst("cache");
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define ___TXWIDESCREENWRAPPER_H__
|
||||
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef OS_ANDROID
|
||||
|
||||
|
@ -49,12 +50,18 @@ private:
|
|||
|
||||
#define wst(A) dummyWString(A).c_str()
|
||||
|
||||
#define removeColon(A)
|
||||
#else
|
||||
|
||||
#define tx_wstring std::wstring
|
||||
#define tx_swprintf swprintf
|
||||
#define wst(A) L##A
|
||||
#define wccmp(A, B) A[0] == B[0]
|
||||
inline
|
||||
void removeColon(tx_wstring& _s)
|
||||
{
|
||||
std::replace(_s.begin(), _s.end(), L':', L'-');
|
||||
}
|
||||
|
||||
#endif // OS_ANDROID
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user