Jan Zerebecki : wined3d: Also print the format like a fourcc if unknown in debug_d3dformat.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jun 13 05:58:32 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: df3e078b2088d51c6a404329012d8e990deab841
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=df3e078b2088d51c6a404329012d8e990deab841

Author: Jan Zerebecki <jan.wine at zerebecki.de>
Date:   Fri Jun  9 17:29:57 2006 +0200

wined3d: Also print the format like a fourcc if unknown in debug_d3dformat.

---

 dlls/wined3d/utils.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 97f5b4f..43beebd 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -95,7 +95,18 @@ #define FMT_TO_STR(fmt) case fmt: return
     FMT_TO_STR(WINED3DFMT_CxV8U8);
 #undef FMT_TO_STR
   default:
-    FIXME("Unrecognized %u D3DFORMAT!\n", fmt);
+    {
+      char fourcc[5];
+      fourcc[0] = (char)(fmt);
+      fourcc[1] = (char)(fmt >> 8);
+      fourcc[2] = (char)(fmt >> 16);
+      fourcc[3] = (char)(fmt >> 24);
+      fourcc[4] = 0;
+      if( isprint(fourcc[0]) && isprint(fourcc[1]) && isprint(fourcc[2]) && isprint(fourcc[3]) )
+        FIXME("Unrecognized %u (as fourcc: %s) D3DFORMAT!\n", fmt, fourcc);
+      else
+        FIXME("Unrecognized %u D3DFORMAT!\n", fmt);
+    }
     return "unrecognized";
   }
 }




More information about the wine-cvs mailing list