Commit 9796bdc9 authored by Sven Baars's avatar Sven Baars Committed by Alexandre Julliard

d3dx9: Remove a recursive call to ID3DXFont_DrawTextW when no rect is specified.

parent 787d98f4
......@@ -629,17 +629,8 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite,
if (format & DT_SINGLELINE)
format &= ~DT_WORDBREAK;
if (!rect)
{
y = ID3DXFont_DrawTextW(iface, NULL, string, count, &textrect, format | DT_CALCRECT, 0);
if (format & DT_CALCRECT)
return y;
}
else
{
if (rect)
textrect = *rect;
}
x = textrect.left;
y = textrect.top;
......@@ -716,7 +707,7 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite,
break;
}
if (format & DT_CALCRECT)
if (format & DT_CALCRECT && rect)
{
*rect = textrect;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment