https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d7f9f9f6e85ae005efbcd…
commit d7f9f9f6e85ae005efbcd320fc0668caf14d32be
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Tue Jan 5 13:16:38 2021 +0100
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Thu Feb 4 16:37:07 2021 +0100
[WINESYNC] d3dx9: Remove unreachable DT_SINGLELINE handling from ID3DXFont_DrawText.
Signed-off-by: Sven Baars <sbaars(a)codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id a097f54ea1e7e75b78842ceb835f5db5f08fea06 by Sven Baars
<sbaars(a)codeweavers.com>
---
dll/directx/wine/d3dx9_36/font.c | 21 +++++++--------------
sdk/tools/winesync/d3dx9.cfg | 2 +-
2 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/dll/directx/wine/d3dx9_36/font.c b/dll/directx/wine/d3dx9_36/font.c
index 14300d32e5e..dbc4166d086 100644
--- a/dll/directx/wine/d3dx9_36/font.c
+++ b/dll/directx/wine/d3dx9_36/font.c
@@ -516,7 +516,7 @@ static INT WINAPI ID3DXFontImpl_DrawTextA(ID3DXFont *iface,
ID3DXSprite *sprite,
}
static void word_break(HDC hdc, const WCHAR *str, unsigned int *str_len,
- unsigned int chars_fit, unsigned int *chars_used, DWORD format, SIZE *size)
+ unsigned int chars_fit, unsigned int *chars_used, SIZE *size)
{
SCRIPT_LOGATTR *sla;
SCRIPT_ANALYSIS sa;
@@ -539,7 +539,7 @@ static void word_break(HDC hdc, const WCHAR *str, unsigned int
*str_len,
--i;
/* If the there is no word that fits put in all characters that do fit */
- if (!sla[i].fSoftBreak || (format & DT_SINGLELINE))
+ if (!sla[i].fSoftBreak)
i = chars_fit;
*chars_used = i;
@@ -575,20 +575,13 @@ static const WCHAR *read_line(HDC hdc, const WCHAR *str, unsigned
int *count,
num_fit = 0;
GetTextExtentExPointW(hdc, dest, *dest_len, width, &num_fit, NULL, size);
- if (num_fit < *dest_len)
+ if (num_fit < *dest_len && (format & DT_WORDBREAK))
{
- if (format & DT_WORDBREAK)
- {
- unsigned int chars_used;
+ unsigned int chars_used;
- word_break(hdc, dest, dest_len, num_fit, &chars_used, format, size);
- *count = orig_count - chars_used;
- i = chars_used;
- }
- else if (format & DT_SINGLELINE)
- {
- *count = 0;
- }
+ word_break(hdc, dest, dest_len, num_fit, &chars_used, size);
+ *count = orig_count - chars_used;
+ i = chars_used;
}
if (*count && str[i] == '\n')
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index 9c4e5a95eb4..8e43f742f2f 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: 84cbf6a49dfe75b9fd497b2c3ef7e922857bb618
+ wine: a097f54ea1e7e75b78842ceb835f5db5f08fea06