Skip video in replacement saving by default.

This commit is contained in:
Unknown W. Brackets committed 2016-05-01 08:58:14 -07:00
1 parent c20075b0e0
commit 994d2dd85e
2 files changed
+7 -1

No files matched your search

+6 -1
View File
@@ -35,7 +35,7 @@ static const std::string NEW_TEXTURE_DIR = "new/";
static const int VERSION = 1;
static const int MAX_MIP_LEVELS = 64;
TextureReplacer::TextureReplacer() : enabled_(false) {
TextureReplacer::TextureReplacer() : enabled_(false), allowVideo_(false), hash_(ReplacedTextureHash::QUICK) {
none_.alphaStatus_ = ReplacedTextureAlpha::UNKNOWN;
}
@@ -87,6 +87,8 @@ bool TextureReplacer::LoadIni() {
return false;
}
options->Get("video", &allowVideo_, false);
int version = 0;
if (options->Get("version", &version, 0) && version > VERSION) {
ERROR_LOG(G3D, "Unsupported texture replacement version %d, trying anyway", version);
@@ -290,6 +292,9 @@ void TextureReplacer::NotifyTextureDecoded(const ReplacedTextureDecodeInfo &repl
// Don't save the PPGe texture.
return;
}
if (replacedInfo.isVideo && !allowVideo_) {
return;
}
std::string hashfile = LookupHashFile(replacedInfo.cachekey, replacedInfo.hash, level);
const std::string filename = basePath_ + hashfile;