[PATCH 1/5] d3dx9: Simplify unsupported format check.

Matteo Bruni mbruni at codeweavers.com
Tue Sep 24 12:46:25 CDT 2019


Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
This is only relevant for the direct copy code path (where source
and destination formats match), the other path has another, more
thorough, check already.

The patch from Paul prompted me to recover and clean up a bunch of
patches that have been stuck in my queue for years. So thank you Paul
I guess :D

 dlls/d3dx9_36/surface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index 8e9b834d882..00a7694ab0b 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -1890,9 +1890,9 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
 
     srcformatdesc = get_format_info(src_format);
     destformatdesc = get_format_info(surfdesc.Format);
-    if (srcformatdesc->type == FORMAT_UNKNOWN || destformatdesc->type == FORMAT_UNKNOWN)
+    if (srcformatdesc->type == FORMAT_UNKNOWN)
     {
-        FIXME("Unsupported pixel format conversion %#x -> %#x\n", src_format, surfdesc.Format);
+        FIXME("Unsupported format %#x.\n", src_format);
         return E_NOTIMPL;
     }
 
-- 
2.21.0




More information about the wine-devel mailing list