mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 10:40:01 +01:00
Merge pull request #8860 from unknownbrackets/tex-replace
Correct replaced texture formats in Direct3D 9
This commit is contained in:
commit
4a1d3c3341
2 files changed
+5
-2
No files matched your search
+2
-1
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user