diff --git a/dll/directx/wine/d3dx9_36/font.c b/dll/directx/wine/d3dx9_36/font.c index 56cef145461..14300d32e5e 100644 --- a/dll/directx/wine/d3dx9_36/font.c +++ b/dll/directx/wine/d3dx9_36/font.c @@ -587,7 +587,6 @@ static const WCHAR *read_line(HDC hdc, const WCHAR *str, unsigned int *count, } else if (format & DT_SINGLELINE) { - *dest_len = num_fit; *count = 0; } } @@ -772,6 +771,21 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite, pos.y = cell_inc.y + y; pos.z = 0; + if (!(format & DT_NOCLIP)) + { + if (pos.x > rect->right) + { + IDirect3DTexture9_Release(texture); + continue; + } + + if (pos.x + black_box.right - black_box.left > rect->right) + black_box.right = black_box.left + rect->right - pos.x; + + if (pos.y + black_box.bottom - black_box.top > rect->bottom) + black_box.bottom = black_box.top + rect->bottom - pos.y; + } + ID3DXSprite_Draw(target, texture, &black_box, NULL, &pos, color); IDirect3DTexture9_Release(texture); } diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 47c8d9b9134..9c4e5a95eb4 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -34,4 +34,4 @@ files: include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h tags: - wine: 2481e617bbd529a297266ad53b1afe1d96e9af89 + wine: 84cbf6a49dfe75b9fd497b2c3ef7e922857bb618