d3dx9: Remove a recursive call to ID3DXFont_DrawTextW when no rect is specified.
Signed-off-by: Sven Baars <sbaars@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
787d98f47c
commit
9796bdc966
|
@ -629,17 +629,8 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite,
|
||||||
if (format & DT_SINGLELINE)
|
if (format & DT_SINGLELINE)
|
||||||
format &= ~DT_WORDBREAK;
|
format &= ~DT_WORDBREAK;
|
||||||
|
|
||||||
if (!rect)
|
if (rect)
|
||||||
{
|
|
||||||
y = ID3DXFont_DrawTextW(iface, NULL, string, count, &textrect, format | DT_CALCRECT, 0);
|
|
||||||
|
|
||||||
if (format & DT_CALCRECT)
|
|
||||||
return y;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
textrect = *rect;
|
textrect = *rect;
|
||||||
}
|
|
||||||
|
|
||||||
x = textrect.left;
|
x = textrect.left;
|
||||||
y = textrect.top;
|
y = textrect.top;
|
||||||
|
@ -716,7 +707,7 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (format & DT_CALCRECT)
|
if (format & DT_CALCRECT && rect)
|
||||||
{
|
{
|
||||||
*rect = textrect;
|
*rect = textrect;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue