[PATCH] wined3d: Split TEXT shader comments into separate lines.
Henri Verbeet
hverbeet at codeweavers.com
Thu Mar 4 05:19:56 CST 2010
Based on a patch by Christian Costa.
---
dlls/wined3d/shader.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 2dc9522..307cadf 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -1231,7 +1231,27 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
fe->shader_read_comment(&ptr, &comment, &comment_size);
if (comment)
{
- TRACE("// %s\n", debugstr_an(comment, comment_size));
+ if (comment_size > 4 && *(const DWORD *)comment == WINEMAKEFOURCC('T', 'E', 'X', 'T'))
+ {
+ const char *end = comment + comment_size;
+ const char *ptr = comment + 4;
+ const char *line = ptr;
+
+ TRACE("// TEXT\n");
+ while (ptr != end)
+ {
+ if (*ptr == '\n')
+ {
+ UINT len = ptr - line;
+ if (len && *(ptr - 1) == '\r') --len;
+ TRACE("// %s\n", debugstr_an(line, len));
+ line = ++ptr;
+ }
+ else ++ptr;
+ }
+ if (line != ptr) TRACE("// %s\n", debugstr_an(line, ptr - line));
+ }
+ else TRACE("// %s\n", debugstr_an(comment, comment_size));
continue;
}
--
1.6.4.4
More information about the wine-patches
mailing list