Merge pull request #8860 from unknownbrackets/tex-replace

Correct replaced texture formats in Direct3D 9
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2016-07-17 19:48:36 +02:00
commit 4a1d3c3341
2 files changed
+5 -2

No files matched your search

+2 -1
View File
@@ -5,7 +5,8 @@ root = true
charset = utf-8
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
# Would be nice, but don't want to change files unnecessarily.
#trim_trailing_whitespace = true
[*.py]
indent_style = space
+3 -1
View File
@@ -1370,7 +1370,9 @@ void TextureCacheDX9::LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &re
int levels = scaleFactor == 1 ? maxLevel + 1 : 1;
int tw = w, th = h;
D3DFORMAT tfmt = (D3DFORMAT)D3DFMT(dstFmt);
if (!replaced.GetSize(level, tw, th)) {
if (replaced.GetSize(level, tw, th)) {
tfmt = (D3DFORMAT)D3DFMT(ToD3D9Format(replaced.Format(level)));
} else {
tw *= scaleFactor;
th *= scaleFactor;
if (scaleFactor > 1) {