From b30d0e8cec8731a147d1ba31185e7a53c1c8d948 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 17 Jul 2016 09:03:08 -0700 Subject: [PATCH 1/2] d3d9: Correct replaced texture format. This was causing the row width to be wrong for many textures too, which was generating errors. --- GPU/Directx9/TextureCacheDX9.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GPU/Directx9/TextureCacheDX9.cpp b/GPU/Directx9/TextureCacheDX9.cpp index 0d0683c02a..c2fce59411 100644 --- a/GPU/Directx9/TextureCacheDX9.cpp +++ b/GPU/Directx9/TextureCacheDX9.cpp @@ -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) { From 69fbdc71568a83f42a9e589550cfc592a738ecf6 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 17 Jul 2016 09:03:44 -0700 Subject: [PATCH 2/2] Avoid trimming trailing whitespace in editors. Unfortunately, many of our files have trailing whitespace... --- .editorconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 2f2129fd9a..d689177aa1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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