winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
996 discussions
Start a n
N
ew thread
Zebediah Figura : wined3d: Move the fill mode to wined3d_rasterizer_state.
by Alexandre Julliard
06 Mar '20
06 Mar '20
Module: wine Branch: master Commit: 63971ccd460c57b7567316eaebf26d55b43c7991 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=63971ccd460c57b7567316ea…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 5 19:28:09 2020 -0600 wined3d: Move the fill mode to wined3d_rasterizer_state. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/device.c | 2 -- dlls/d3d11/state.c | 1 + dlls/wined3d/device.c | 70 +++++++++++++++++++++++++++++++++++++----- dlls/wined3d/state.c | 19 +++++++----- dlls/wined3d/wined3d_private.h | 3 +- include/wine/wined3d.h | 1 + 6 files changed, 77 insertions(+), 19 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=63971ccd460c57b75673…
1
0
0
0
Zebediah Figura : wined3d: Remove now redundant error handling from wined3d_device_set_texture_stage_state().
by Alexandre Julliard
06 Mar '20
06 Mar '20
Module: wine Branch: master Commit: 9647dc2ae5d3b548b0b86865686ea9e270588e74 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9647dc2ae5d3b548b0b86865…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 5 19:28:08 2020 -0600 wined3d: Remove now redundant error handling from wined3d_device_set_texture_stage_state(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/device.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 53d3b7c1d8..cdb3202ac1 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3415,12 +3415,6 @@ static void wined3d_device_set_texture_stage_state(struct wined3d_device *device TRACE("device %p, stage %u, state %s, value %#x.\n", device, stage, debug_d3dtexturestate(state), value); - if (state > WINED3D_HIGHEST_TEXTURE_STATE) - { - WARN("Invalid state %#x passed.\n", state); - return; - } - if (stage >= d3d_info->limits.ffp_blend_stages) { WARN("Attempting to set stage %u which is higher than the max stage %u, ignoring.\n",
1
0
0
0
Zebediah Figura : wined3d: Remove now redundant error handling from wined3d_device_set_*_consts_*().
by Alexandre Julliard
06 Mar '20
06 Mar '20
Module: wine Branch: master Commit: 58dfe8f529082c27e8c5819ec89d16c45b136bff URL:
https://source.winehq.org/git/wine.git/?a=commit;h=58dfe8f529082c27e8c5819e…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 5 19:28:07 2020 -0600 wined3d: Remove now redundant error handling from wined3d_device_set_*_consts_*(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/device.c | 58 ++++++--------------------------------------------- 1 file changed, 6 insertions(+), 52 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 21f9af9566..53d3b7c1d8 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2001,7 +2001,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3 return wined3d_device_get_sampler(device, WINED3D_SHADER_TYPE_VERTEX, idx); } -static HRESULT wined3d_device_set_vs_consts_b(struct wined3d_device *device, +static void wined3d_device_set_vs_consts_b(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const BOOL *constants) { unsigned int i; @@ -2009,12 +2009,6 @@ static HRESULT wined3d_device_set_vs_consts_b(struct wined3d_device *device, TRACE("device %p, start_idx %u, count %u, constants %p.\n", device, start_idx, count, constants); - if (!constants || start_idx >= WINED3D_MAX_CONSTS_B) - return WINED3DERR_INVALIDCALL; - - if (count > WINED3D_MAX_CONSTS_B - start_idx) - count = WINED3D_MAX_CONSTS_B - start_idx; - memcpy(&device->state.vs_consts_b[start_idx], constants, count * sizeof(*constants)); if (TRACE_ON(d3d)) { @@ -2023,11 +2017,9 @@ static HRESULT wined3d_device_set_vs_consts_b(struct wined3d_device *device, } wined3d_cs_push_constants(device->cs, WINED3D_PUSH_CONSTANTS_VS_B, start_idx, count, constants); - - return WINED3D_OK; } -static HRESULT wined3d_device_set_vs_consts_i(struct wined3d_device *device, +static void wined3d_device_set_vs_consts_i(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants) { unsigned int i; @@ -2035,12 +2027,6 @@ static HRESULT wined3d_device_set_vs_consts_i(struct wined3d_device *device, TRACE("device %p, start_idx %u, count %u, constants %p.\n", device, start_idx, count, constants); - if (!constants || start_idx >= WINED3D_MAX_CONSTS_I) - return WINED3DERR_INVALIDCALL; - - if (count > WINED3D_MAX_CONSTS_I - start_idx) - count = WINED3D_MAX_CONSTS_I - start_idx; - memcpy(&device->state.vs_consts_i[start_idx], constants, count * sizeof(*constants)); if (TRACE_ON(d3d)) { @@ -2049,23 +2035,16 @@ static HRESULT wined3d_device_set_vs_consts_i(struct wined3d_device *device, } wined3d_cs_push_constants(device->cs, WINED3D_PUSH_CONSTANTS_VS_I, start_idx, count, constants); - - return WINED3D_OK; } -static HRESULT wined3d_device_set_vs_consts_f(struct wined3d_device *device, +static void wined3d_device_set_vs_consts_f(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants) { - const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; unsigned int i; TRACE("device %p, start_idx %u, count %u, constants %p.\n", device, start_idx, count, constants); - if (!constants || start_idx >= d3d_info->limits.vs_uniform_count - || count > d3d_info->limits.vs_uniform_count - start_idx) - return WINED3DERR_INVALIDCALL; - memcpy(&device->state.vs_consts_f[start_idx], constants, count * sizeof(*constants)); if (TRACE_ON(d3d)) { @@ -2074,8 +2053,6 @@ static HRESULT wined3d_device_set_vs_consts_f(struct wined3d_device *device, } wined3d_cs_push_constants(device->cs, WINED3D_PUSH_CONSTANTS_VS_F, start_idx, count, constants); - - return WINED3D_OK; } void CDECL wined3d_device_set_pixel_shader(struct wined3d_device *device, struct wined3d_shader *shader) @@ -2132,7 +2109,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_ps_sampler(const struct wined3 return wined3d_device_get_sampler(device, WINED3D_SHADER_TYPE_PIXEL, idx); } -static HRESULT wined3d_device_set_ps_consts_b(struct wined3d_device *device, +static void wined3d_device_set_ps_consts_b(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const BOOL *constants) { unsigned int i; @@ -2140,12 +2117,6 @@ static HRESULT wined3d_device_set_ps_consts_b(struct wined3d_device *device, TRACE("device %p, start_idx %u, count %u, constants %p.\n", device, start_idx, count, constants); - if (!constants || start_idx >= WINED3D_MAX_CONSTS_B) - return WINED3DERR_INVALIDCALL; - - if (count > WINED3D_MAX_CONSTS_B - start_idx) - count = WINED3D_MAX_CONSTS_B - start_idx; - memcpy(&device->state.ps_consts_b[start_idx], constants, count * sizeof(*constants)); if (TRACE_ON(d3d)) { @@ -2154,11 +2125,9 @@ static HRESULT wined3d_device_set_ps_consts_b(struct wined3d_device *device, } wined3d_cs_push_constants(device->cs, WINED3D_PUSH_CONSTANTS_PS_B, start_idx, count, constants); - - return WINED3D_OK; } -static HRESULT wined3d_device_set_ps_consts_i(struct wined3d_device *device, +static void wined3d_device_set_ps_consts_i(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants) { unsigned int i; @@ -2166,12 +2135,6 @@ static HRESULT wined3d_device_set_ps_consts_i(struct wined3d_device *device, TRACE("device %p, start_idx %u, count %u, constants %p.\n", device, start_idx, count, constants); - if (!constants || start_idx >= WINED3D_MAX_CONSTS_I) - return WINED3DERR_INVALIDCALL; - - if (count > WINED3D_MAX_CONSTS_I - start_idx) - count = WINED3D_MAX_CONSTS_I - start_idx; - memcpy(&device->state.ps_consts_i[start_idx], constants, count * sizeof(*constants)); if (TRACE_ON(d3d)) { @@ -2180,23 +2143,16 @@ static HRESULT wined3d_device_set_ps_consts_i(struct wined3d_device *device, } wined3d_cs_push_constants(device->cs, WINED3D_PUSH_CONSTANTS_PS_I, start_idx, count, constants); - - return WINED3D_OK; } -static HRESULT wined3d_device_set_ps_consts_f(struct wined3d_device *device, +static void wined3d_device_set_ps_consts_f(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants) { - const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; unsigned int i; TRACE("device %p, start_idx %u, count %u, constants %p.\n", device, start_idx, count, constants); - if (!constants || start_idx >= d3d_info->limits.ps_uniform_count - || count > d3d_info->limits.ps_uniform_count - start_idx) - return WINED3DERR_INVALIDCALL; - memcpy(&device->state.ps_consts_f[start_idx], constants, count * sizeof(*constants)); if (TRACE_ON(d3d)) { @@ -2205,8 +2161,6 @@ static HRESULT wined3d_device_set_ps_consts_f(struct wined3d_device *device, } wined3d_cs_push_constants(device->cs, WINED3D_PUSH_CONSTANTS_PS_F, start_idx, count, constants); - - return WINED3D_OK; } void CDECL wined3d_device_set_hull_shader(struct wined3d_device *device, struct wined3d_shader *shader)
1
0
0
0
Sven Baars : d3dx9: Handle word breaks in ID3DXFont_DrawText.
by Alexandre Julliard
06 Mar '20
06 Mar '20
Module: wine Branch: master Commit: e6a1116c2a3b196dea496f77747209f67982652c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e6a1116c2a3b196dea496f77…
Author: Sven Baars <sbaars(a)codeweavers.com> Date: Thu Mar 5 22:39:59 2020 +0100 d3dx9: Handle word breaks in 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> --- dlls/d3dx9_24/Makefile.in | 2 +- dlls/d3dx9_25/Makefile.in | 2 +- dlls/d3dx9_26/Makefile.in | 2 +- dlls/d3dx9_27/Makefile.in | 2 +- dlls/d3dx9_28/Makefile.in | 2 +- dlls/d3dx9_29/Makefile.in | 2 +- dlls/d3dx9_30/Makefile.in | 2 +- dlls/d3dx9_31/Makefile.in | 2 +- dlls/d3dx9_32/Makefile.in | 2 +- dlls/d3dx9_33/Makefile.in | 2 +- dlls/d3dx9_34/Makefile.in | 2 +- dlls/d3dx9_35/Makefile.in | 2 +- dlls/d3dx9_36/Makefile.in | 2 +- dlls/d3dx9_36/font.c | 61 +++++++++++++++++++++++++++++++++++++++++++--- dlls/d3dx9_36/tests/core.c | 22 ++++++++--------- dlls/d3dx9_37/Makefile.in | 2 +- dlls/d3dx9_38/Makefile.in | 2 +- dlls/d3dx9_39/Makefile.in | 2 +- dlls/d3dx9_40/Makefile.in | 2 +- dlls/d3dx9_41/Makefile.in | 2 +- dlls/d3dx9_42/Makefile.in | 2 +- dlls/d3dx9_43/Makefile.in | 2 +- 22 files changed, 89 insertions(+), 34 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e6a1116c2a3b196dea49…
1
0
0
0
Sven Baars : d3dx9: Handle clipping in ID3DXFont_DrawText.
by Alexandre Julliard
06 Mar '20
06 Mar '20
Module: wine Branch: master Commit: 6da3e904a1efc921030fdbe34070b981bf57524c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6da3e904a1efc921030fdbe3…
Author: Sven Baars <sbaars(a)codeweavers.com> Date: Thu Mar 5 22:39:58 2020 +0100 d3dx9: Handle clipping in 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> --- dlls/d3dx9_36/font.c | 5 +++++ dlls/d3dx9_36/tests/core.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/d3dx9_36/font.c b/dlls/d3dx9_36/font.c index 71cfddb0d4..9e9cb658db 100644 --- a/dlls/d3dx9_36/font.c +++ b/dlls/d3dx9_36/font.c @@ -559,6 +559,9 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite, if (!count) return 0; + if (format & DT_CALCRECT) + format |= DT_NOCLIP; + if (!rect) { y = ID3DXFont_DrawTextW(iface, NULL, string, count, &textrect, format | DT_CALCRECT, 0); @@ -637,6 +640,8 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite, heap_free(results.lpGlyphs); } y += lh; + if (!(DT_NOCLIP & format) && (y > textrect.bottom)) + break; } ret = y - textrect.top; diff --git a/dlls/d3dx9_36/tests/core.c b/dlls/d3dx9_36/tests/core.c index c6f5beff43..c79f5c1f72 100644 --- a/dlls/d3dx9_36/tests/core.c +++ b/dlls/d3dx9_36/tests/core.c @@ -780,7 +780,7 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) todo_wine ok(height == 36, "Got unexpected height %d.\n", height); height = ID3DXFont_DrawTextW(font, NULL, L"1\n2\n3\n4\n5\n6", -1, &rect, 0, 0xff00ff); - todo_wine ok(height == 48, "Got unexpected height %d.\n", height); + ok(height == 48, "Got unexpected height %d.\n", height); height = ID3DXFont_DrawTextW(font, NULL, L"1\n2\n3\n4\n5\n6", -1, &rect, DT_NOCLIP, 0xff00ff); ok(height == 72, "Got unexpected height %d.\n", height);
1
0
0
0
Sven Baars : d3dx9: Handle newlines in ID3DXFont_DrawText.
by Alexandre Julliard
06 Mar '20
06 Mar '20
Module: wine Branch: master Commit: 330c3f9108191feb6eb888384befb5cb54645233 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=330c3f9108191feb6eb88838…
Author: Sven Baars <sbaars(a)codeweavers.com> Date: Thu Mar 5 22:39:57 2020 +0100 d3dx9: Handle newlines in 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> --- dlls/d3dx9_36/font.c | 109 +++++++++++++++++++++++++++++++-------------- dlls/d3dx9_36/tests/core.c | 14 +++--- 2 files changed, 83 insertions(+), 40 deletions(-) diff --git a/dlls/d3dx9_36/font.c b/dlls/d3dx9_36/font.c index 8ca35b8c21..71cfddb0d4 100644 --- a/dlls/d3dx9_36/font.c +++ b/dlls/d3dx9_36/font.c @@ -509,13 +509,42 @@ static INT WINAPI ID3DXFontImpl_DrawTextA(ID3DXFont *iface, ID3DXSprite *sprite, return ret; } +static const WCHAR *read_line(HDC hdc, const WCHAR *str, int *count, + WCHAR *dest, unsigned int *dest_len, int width) +{ + unsigned int i = 0; + SIZE size; + + *dest_len = 0; + while (*count && str[i] != '\n') + { + --(*count); + if (str[i] != '\r') + dest[(*dest_len)++] = str[i]; + ++i; + } + + GetTextExtentExPointW(hdc, dest, *dest_len, width, NULL, NULL, &size); + + if (*count && str[i] == '\n') + { + --(*count); + ++i; + } + + if (*count) + return str + i; + return NULL; +} + static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite, const WCHAR *string, INT count, RECT *rect, DWORD format, D3DCOLOR color) { struct d3dx_font *font = impl_from_ID3DXFont(iface); ID3DXSprite *target = sprite; + WCHAR *line; RECT textrect = {0}; - int lh, x, y; + int lh, x, y, width; int ret = 0; TRACE("iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color 0x%08x.\n", @@ -544,59 +573,71 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite, x = textrect.left; y = textrect.top; + width = textrect.right - textrect.left; lh = font->metrics.tmHeight; + line = heap_alloc(count * sizeof(*line)); + if (!line) + return 0; + if (!(format & DT_CALCRECT) && !sprite) { D3DXCreateSprite(font->device, &target); ID3DXSprite_Begin(target, 0); } - if (!(format & DT_CALCRECT)) + while (string) { - GCP_RESULTSW results; - D3DXVECTOR3 pos; - int i; - - memset(&results, 0, sizeof(results)); - results.nGlyphs = count; + unsigned int line_len; - results.lpCaretPos = heap_alloc(count * sizeof(*results.lpCaretPos)); - if (!results.lpCaretPos) - goto cleanup; + string = read_line(font->hdc, string, &count, line, &line_len, width); - results.lpGlyphs = heap_alloc(count * sizeof(*results.lpGlyphs)); - if (!results.lpGlyphs) + if (!(format & DT_CALCRECT)) { - heap_free(results.lpCaretPos); - goto cleanup; - } + GCP_RESULTSW results; + D3DXVECTOR3 pos; + unsigned int i; - GetCharacterPlacementW(font->hdc, string, count, 0, &results, 0); + memset(&results, 0, sizeof(results)); + results.nGlyphs = line_len; - for (i = 0; i < results.nGlyphs; ++i) - { - IDirect3DTexture9 *texture; - POINT cell_inc; - RECT black_box; + results.lpCaretPos = heap_alloc(line_len * sizeof(*results.lpCaretPos)); + if (!results.lpCaretPos) + goto cleanup; - ID3DXFont_GetGlyphData(iface, results.lpGlyphs[i], &texture, &black_box, &cell_inc); + results.lpGlyphs = heap_alloc(line_len * sizeof(*results.lpGlyphs)); + if (!results.lpGlyphs) + { + heap_free(results.lpCaretPos); + goto cleanup; + } - if (!texture) - continue; + GetCharacterPlacementW(font->hdc, line, line_len, 0, &results, 0); - pos.x = cell_inc.x + x + results.lpCaretPos[i]; - pos.y = cell_inc.y + y; + for (i = 0; i < results.nGlyphs; ++i) + { + IDirect3DTexture9 *texture; + POINT cell_inc; + RECT black_box; - ID3DXSprite_Draw(target, texture, &black_box, NULL, &pos, color); - IDirect3DTexture9_Release(texture); - } + ID3DXFont_GetGlyphData(iface, results.lpGlyphs[i], &texture, &black_box, &cell_inc); - heap_free(results.lpCaretPos); - heap_free(results.lpGlyphs); + if (!texture) + continue; + + pos.x = cell_inc.x + x + results.lpCaretPos[i]; + pos.y = cell_inc.y + y; + + ID3DXSprite_Draw(target, texture, &black_box, NULL, &pos, color); + IDirect3DTexture9_Release(texture); + } + + heap_free(results.lpCaretPos); + heap_free(results.lpGlyphs); + } + y += lh; } - y += lh; ret = y - textrect.top; @@ -607,6 +648,8 @@ cleanup: ID3DXSprite_Release(target); } + heap_free(line); + return ret; } diff --git a/dlls/d3dx9_36/tests/core.c b/dlls/d3dx9_36/tests/core.c index c1e0eac0c8..c6f5beff43 100644 --- a/dlls/d3dx9_36/tests/core.c +++ b/dlls/d3dx9_36/tests/core.c @@ -762,19 +762,19 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) todo_wine ok(height == 96, "Got unexpected height %d.\n", height); height = ID3DXFont_DrawTextW(font, NULL, L"a\na", -1, &rect, 0, 0xff00ff); - todo_wine ok(height == 24, "Got unexpected height %d.\n", height); + ok(height == 24, "Got unexpected height %d.\n", height); height = ID3DXFont_DrawTextW(font, NULL, L"a\r\na", -1, &rect, 0, 0xff00ff); - todo_wine ok(height == 24, "Got unexpected height %d.\n", height); + ok(height == 24, "Got unexpected height %d.\n", height); height = ID3DXFont_DrawTextW(font, NULL, L"a\ra", -1, &rect, 0, 0xff00ff); ok(height == 12, "Got unexpected height %d.\n", height); height = ID3DXFont_DrawTextW(font, NULL, L"a\na", -1, &rect, DT_SINGLELINE, 0xff00ff); - ok(height == 12, "Got unexpected height %d.\n", height); + todo_wine ok(height == 12, "Got unexpected height %d.\n", height); height = ID3DXFont_DrawTextW(font, NULL, L"a\naaaaa aaaa", -1, &rect, 0, 0xff00ff); - todo_wine ok(height == 24, "Got unexpected height %d.\n", height); + ok(height == 24, "Got unexpected height %d.\n", height); height = ID3DXFont_DrawTextW(font, NULL, L"a\naaaaa aaaa", -1, &rect, DT_WORDBREAK, 0xff00ff); todo_wine ok(height == 36, "Got unexpected height %d.\n", height); @@ -783,7 +783,7 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) todo_wine ok(height == 48, "Got unexpected height %d.\n", height); height = ID3DXFont_DrawTextW(font, NULL, L"1\n2\n3\n4\n5\n6", -1, &rect, DT_NOCLIP, 0xff00ff); - todo_wine ok(height == 72, "Got unexpected height %d.\n", height); + ok(height == 72, "Got unexpected height %d.\n", height); height = ID3DXFont_DrawTextW(font, NULL, L"\t\t\t\t\t\t\t\t\t\t", -1, &rect, DT_WORDBREAK, 0xff00ff); todo_wine ok(height == 0, "Got unexpected height %d.\n", height); @@ -834,10 +834,10 @@ static void test_ID3DXFont(IDirect3DDevice9 *device) todo_wine ok(height == 32, "Got unexpected height %d.\n", height); height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_RIGHT, 0xff00ff); - todo_wine ok(height == 24, "Got unexpected height %d.\n", height); + ok(height == 24, "Got unexpected height %d.\n", height); height = ID3DXFont_DrawTextW(font, NULL, L"aaaa\naaaa", -1, &rect, DT_CENTER, 0xff00ff); - todo_wine ok(height == 24, "Got unexpected height %d.\n", height); + ok(height == 24, "Got unexpected height %d.\n", height); ID3DXFont_Release(font); }
1
0
0
0
Rémi Bernon : d3d9/tests: Make d3d9ex test_window_style checks consistent with device.
by Alexandre Julliard
06 Mar '20
06 Mar '20
Module: wine Branch: master Commit: cf40d5a3985ecf8a5e8fc23b2969013560663948 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cf40d5a3985ecf8a5e8fc23b…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 5 20:55:06 2020 +0100 d3d9/tests: Make d3d9ex test_window_style checks consistent with device. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/tests/d3d9ex.c | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index d143772686..17dd3c5c12 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -3514,13 +3514,15 @@ static void test_window_style(void) } style = GetWindowLongA(device_window, GWL_STYLE); - todo_wine ok((style & ~WS_OVERLAPPEDWINDOW) == (device_style & ~WS_OVERLAPPEDWINDOW), + expected_style = device_style; + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window style %#x, got %#x, i=%u.\n", - device_style, style, i); + expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); - todo_wine ok((style & ~WS_EX_OVERLAPPEDWINDOW) == (device_exstyle & ~WS_EX_OVERLAPPEDWINDOW), + expected_style = device_exstyle; + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window extended style %#x, got %#x, i=%u.\n", - device_exstyle, style, i); + expected_style, style, i); style = GetWindowLongA(focus_window, GWL_STYLE); ok(style == focus_style, "Expected focus window style %#x, got %#x, i=%u.\n", @@ -3537,8 +3539,8 @@ static void test_window_style(void) ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s, i=%u.\n", wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r), i); GetClientRect(device_window, &r2); - if (!(device_style & WS_OVERLAPPEDWINDOW)) - ok(!EqualRect(&r, &r2), "Client rect and window rect are equal, i=%u.\n", i); + todo_wine ok(!EqualRect(&r, &r2) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */, + "Client rect and window rect are equal, i=%u.\n", i); GetWindowRect(focus_window, &r); ok(EqualRect(&r, &focus_rect), "Expected %s, got %s, i=%u.\n", wine_dbgstr_rect(&focus_rect), wine_dbgstr_rect(&r), i); @@ -3548,12 +3550,14 @@ static void test_window_style(void) ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr); style = GetWindowLongA(device_window, GWL_STYLE); + expected_style = device_style; todo_wine_if (!(tests[i].style_flags & WS_VISIBLE)) - ok(style == device_style, "Expected device window style %#x, got %#x, i=%u.\n", - device_style, style, i); + ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", + expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); - todo_wine ok(style == device_exstyle, "Expected device window extended style %#x, got %#x, i=%u.\n", - device_exstyle, style, i); + expected_style = device_exstyle; + todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", + expected_style, style, i); style = GetWindowLongA(focus_window, GWL_STYLE); ok(style == focus_style, "Expected focus window style %#x, got %#x, i=%u.\n", @@ -3566,12 +3570,14 @@ static void test_window_style(void) ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); style = GetWindowLongA(device_window, GWL_STYLE); - todo_wine_if (!(device_style & WS_VISIBLE)) - ok(style == device_style, "Expected device window style %#x, got %#x, i=%u.\n", - device_style, style, i); + expected_style = device_style; + todo_wine_if (!(tests[i].style_flags & WS_VISIBLE)) + ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", + expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); - todo_wine ok(style == device_exstyle, "Expected device window extended style %#x, got %#x, i=%u.\n", - device_exstyle, style, i); + expected_style = device_exstyle; + todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", + expected_style, style, i); style = GetWindowLongA(focus_window, GWL_STYLE); ok(style == focus_style, "Expected focus window style %#x, got %#x, i=%u.\n", @@ -3587,13 +3593,12 @@ static void test_window_style(void) ok(!!device, "Failed to create a D3D device.\n"); style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | tests[i].create2_style; - todo_wine ok((style & ~WS_OVERLAPPEDWINDOW) == (expected_style & ~WS_OVERLAPPEDWINDOW), + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window style %#x, got %#x, i=%u.\n", expected_style, style, i); - expected_style = device_exstyle | tests[i].create2_exstyle; style = GetWindowLongA(device_window, GWL_EXSTYLE); - todo_wine_if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) - ok((style & ~WS_EX_OVERLAPPEDWINDOW) == (expected_style & ~WS_EX_OVERLAPPEDWINDOW), + expected_style = device_exstyle | tests[i].create2_exstyle; + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window extended style %#x, got %#x, i=%u.\n", expected_style, style, i); @@ -3624,8 +3629,9 @@ static void test_window_style(void) todo_wine ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); - todo_wine ok(style == device_exstyle, "Expected device window extended style %#x, got %#x, i=%u.\n", - device_exstyle, style, i); + expected_style = device_exstyle; + todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", + expected_style, style, i); style = GetWindowLongA(focus_window, GWL_STYLE); ok(style == focus_style, "Expected focus window style %#x, got %#x, i=%u.\n",
1
0
0
0
Rémi Bernon : d3d9/tests: Make device test_window_style checks more consistent.
by Alexandre Julliard
06 Mar '20
06 Mar '20
Module: wine Branch: master Commit: 5f11554c49183cd89b401cc51256fbd4183c41db URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5f11554c49183cd89b401cc5…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 5 20:55:05 2020 +0100 d3d9/tests: Make device test_window_style checks more consistent. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/tests/device.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 86936b0cc1..d00a26b942 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -4919,19 +4919,19 @@ static void test_window_style(void) style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | tests[i].focus_loss_style | tests[i].style; - todo_wine ok(style == expected_style, "Expected device window style %#x, got %#x.\n", - expected_style, style); + todo_wine ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", + expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle | tests[i].exstyle; - todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x.\n", - expected_style, style); + todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", + expected_style, style, i); style = GetWindowLongA(focus_window, GWL_STYLE); - ok(style == focus_style, "Expected focus window style %#x, got %#x.\n", - focus_style, style); + ok(style == focus_style, "Expected focus window style %#x, got %#x, i=%u.\n", + focus_style, style, i); style = GetWindowLongA(focus_window, GWL_EXSTYLE); - ok(style == focus_exstyle, "Expected focus window extended style %#x, got %#x.\n", - focus_exstyle, style); + ok(style == focus_exstyle, "Expected focus window extended style %#x, got %#x, i=%u.\n", + focus_exstyle, style, i); /* In d3d8 follow-up tests fail on native if the device is destroyed while * lost. This doesn't happen in d3d9 on my test machine but it still seems
1
0
0
0
Rémi Bernon : d3d9/tests: Explicit test_window_style results on w1064v1809.
by Alexandre Julliard
06 Mar '20
06 Mar '20
Module: wine Branch: master Commit: 64188baffed8177e668a1c3f95d27335305cb542 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=64188baffed8177e668a1c3f…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 5 20:55:04 2020 +0100 d3d9/tests: Explicit test_window_style results on w1064v1809. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/tests/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 8c1ebc1719..86936b0cc1 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -4859,12 +4859,12 @@ static void test_window_style(void) style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | tests[i].style; - todo_wine ok(style == expected_style || broken(style == (expected_style & 0xff000000)), + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window style %#x, got %#x, i=%u.\n", expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle | tests[i].exstyle; - todo_wine ok(style == expected_style || broken(style == (expected_style & 0xff)), + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window extended style %#x, got %#x, i=%u.\n", expected_style, style, i); @@ -4883,7 +4883,7 @@ static void test_window_style(void) ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s, i=%u.\n", wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r), i); GetClientRect(device_window, &r2); - todo_wine ok(!EqualRect(&r, &r2) || broken(!(style & WS_THICKFRAME)), + todo_wine ok(!EqualRect(&r, &r2) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */, "Client rect and window rect are equal, i=%u.\n", i); GetWindowRect(focus_window, &r); ok(EqualRect(&r, &focus_rect), "Expected %s, got %s, i=%u.\n",
1
0
0
0
Rémi Bernon : d3d8/tests: Add test_window_style results for w1064v1809.
by Alexandre Julliard
06 Mar '20
06 Mar '20
Module: wine Branch: master Commit: fa4890965763e1e1a05728333505cfcd7dd671c8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fa4890965763e1e1a0572833…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 5 20:55:03 2020 +0100 d3d8/tests: Add test_window_style results for w1064v1809. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/tests/device.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 19351da091..008395df1a 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -3784,11 +3784,13 @@ static void test_window_style(void) style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | WS_VISIBLE; - todo_wine ok(style == expected_style, "Expected device window style %#x, got %#x.\n", + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, + "Expected device window style %#x, got %#x.\n", expected_style, style); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle | WS_EX_TOPMOST; - todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x.\n", + todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, + "Expected device window extended style %#x, got %#x.\n", expected_style, style); style = GetWindowLongA(focus_window, GWL_STYLE); @@ -3802,7 +3804,8 @@ static void test_window_style(void) ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r)); GetClientRect(device_window, &r); - todo_wine ok(!EqualRect(&r, &fullscreen_rect), "Client rect and window rect are equal.\n"); + todo_wine ok(!EqualRect(&r, &fullscreen_rect) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */, + "Client rect and window rect are equal.\n"); GetWindowRect(focus_window, &r); ok(EqualRect(&r, &focus_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&focus_rect), wine_dbgstr_rect(&r));
1
0
0
0
← Newer
1
...
82
83
84
85
86
87
88
...
100
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Results per page:
10
25
50
100
200