[PATCH] wined3d: Display correctly TEXT comments by printing lines separately

Christian Costa titan.costa at wanadoo.fr
Mon Mar 1 16:46:44 CST 2010


Henri Verbeet a écrit :
> On 1 March 2010 09:39, Christian Costa <titan.costa at wanadoo.fr> wrote:
>   
>
> Still not quite right, I'm afraid. For example, the following doesn't work:
>   
>> +                    while (i < size)
>> +                    {
>> +                        /* Find end of line */
>> +                        while ((str[i] != 0) && (str[i] != 0x0a))
>> +                            i++;
>>     
>
> How does something like the attached patch work (untested)?
>   
> ------------------------------------------------------------------------
>
>
This should have work. I allocated an extra byte at the end to mark the 
end of the string but
I forgot to set it to null. That explains why I had in few cases some 
small garbage at the end.
Anyway all this null terminated string stuff is no more usefull and make 
code simpler since we can
set the length strings with debugstr_an.

I've just tested your patch and it's work fine so you can submit it. Thanks.
Extra zeros at the end are show as below but that's pointless.

trace:d3d_shader:shader_trace_init // "            mul_x2_sat r0, r0, 
r0.a      \x00\x00\x00"

Altough TRACE will not display anything if the traces are enabled, I 
would have tested the channel before even entering
this code part.






More information about the wine-devel mailing list