Skip to content

Commit

Permalink
Dump hires textures cache to file right after load from texture pack.
Browse files Browse the repository at this point in the history
It is more safe than dump when emulator closed.

Fixed Texture cache fails to save to disk #1761
  • Loading branch information
gonetz committed May 2, 2018
1 parent 035f76e commit 2ef3372
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/GLideNHQ/TxHiResCache.cpp
Expand Up @@ -86,8 +86,10 @@ TxHiResCache::TxHiResCache(int maxwidth,
}

/* read in hires textures */
if (!_cacheDumped)
TxHiResCache::load(0);
if (!_cacheDumped) {
if (TxHiResCache::load(0) && (_options & DUMP_HIRESTEXCACHE) != 0)
_cacheDumped = TxCache::save(_cachePath.c_str(), _getFileName().c_str(), _getConfig());
}
}

void TxHiResCache::dump()
Expand Down

0 comments on commit 2ef3372

Please sign in to comment.