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 2019
----- 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
2 participants
1097 discussions
Start a n
N
ew thread
Matteo Bruni : d3d9: Return failure in CheckDeviceFormat() for unsupported adapter formats.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: bd7a48c25114983f53c2c05299444e982f5a5490 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bd7a48c25114983f53c2c052…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Mar 5 18:47:21 2019 +0100 d3d9: Return failure in CheckDeviceFormat() for unsupported adapter formats. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46579
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/directx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c index eab114d..c507991 100644 --- a/dlls/d3d9/directx.c +++ b/dlls/d3d9/directx.c @@ -255,10 +255,11 @@ static HRESULT WINAPI d3d9_CheckDeviceFormat(IDirect3D9Ex *iface, UINT adapter, TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, usage %#x, resource_type %#x, format %#x.\n", iface, adapter, device_type, adapter_format, usage, resource_type, format); - if (!adapter_format) + if (adapter_format != D3DFMT_X8R8G8B8 && adapter_format != D3DFMT_R5G6B5 + && adapter_format != D3DFMT_X1R5G5B5) { WARN("Invalid adapter format.\n"); - return D3DERR_INVALIDCALL; + return adapter_format ? D3DERR_NOTAVAILABLE : D3DERR_INVALIDCALL; } bind_flags = wined3d_bind_flags_from_d3d9_usage(usage);
1
0
0
0
Matteo Bruni : d3d8: Don't upload unused system memory vertex buffers.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: c79fbdd3bf95cf91708386bf470970a881e7bfaa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c79fbdd3bf95cf91708386bf…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Mar 5 18:47:20 2019 +0100 d3d8: Don't upload unused system memory vertex buffers. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/d3d8_private.h | 1 + dlls/d3d8/device.c | 12 +++++++++++- dlls/d3d8/vertexdeclaration.c | 9 +++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index 7c44f07..0f86165 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -251,6 +251,7 @@ struct d3d8_vertex_declaration { DWORD *elements; DWORD elements_size; /* Size of elements, in bytes */ + DWORD stream_map; struct wined3d_vertex_declaration *wined3d_vertex_declaration; DWORD shader_handle; }; diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index d367f42..56c363c 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -2269,15 +2269,25 @@ static HRESULT WINAPI d3d8_device_GetCurrentTexturePalette(IDirect3DDevice8 *ifa static void d3d8_device_upload_sysmem_vertex_buffers(struct d3d8_device *device, unsigned int start_vertex, unsigned int vertex_count) { + struct wined3d_vertex_declaration *wined3d_decl; struct wined3d_box box = {0, 0, 0, 1, 0, 1}; struct d3d8_vertexbuffer *d3d8_buffer; struct wined3d_resource *dst_resource; + struct d3d8_vertex_declaration *decl; unsigned int i, offset, stride, map; struct wined3d_buffer *dst_buffer; struct wined3d_resource_desc desc; HRESULT hr; - map = device->sysmem_vb; + if (!device->sysmem_vb) + return; + + wined3d_decl = wined3d_device_get_vertex_declaration(device->wined3d_device); + if (!wined3d_decl) + return; + + decl = wined3d_vertex_declaration_get_parent(wined3d_decl); + map = decl->stream_map & device->sysmem_vb; while (map) { i = wined3d_bit_scan(&map); diff --git a/dlls/d3d8/vertexdeclaration.c b/dlls/d3d8/vertexdeclaration.c index 709e04b..c2d0b9f 100644 --- a/dlls/d3d8/vertexdeclaration.c +++ b/dlls/d3d8/vertexdeclaration.c @@ -250,7 +250,7 @@ wined3d_usage_lookup[] = /* TODO: find out where rhw (or positionT) is for declaration8 */ static UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_elements_size, - struct wined3d_vertex_element **wined3d_elements) + struct wined3d_vertex_element **wined3d_elements, DWORD *stream_map) { struct wined3d_vertex_element *element; const DWORD *token = d3d8_elements; @@ -261,6 +261,7 @@ static UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3 TRACE("d3d8_elements %p, d3d8_elements_size %p, wined3d_elements %p\n", d3d8_elements, d3d8_elements_size, wined3d_elements); + *stream_map = 0; /* 128 should be enough for anyone... */ *wined3d_elements = heap_alloc_zero(128 * sizeof(**wined3d_elements)); while (D3DVSD_END() != *token) @@ -288,6 +289,8 @@ static UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3 element->usage = wined3d_usage_lookup[reg].usage; element->usage_idx = wined3d_usage_lookup[reg].usage_idx; + *stream_map |= 1u << stream; + offset += wined3d_type_sizes[type]; } else if (token_type == D3DVSD_TOKEN_STREAMDATA && (*token & D3DVSD_DATALOADTYPEMASK)) { TRACE(" 0x%08x SKIP(%u)\n", token_type, ((token_type & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT)); @@ -337,7 +340,8 @@ HRESULT d3d8_vertex_declaration_init(struct d3d8_vertex_declaration *declaration declaration->shader_handle = shader_handle; - wined3d_element_count = convert_to_wined3d_declaration(elements, &declaration->elements_size, &wined3d_elements); + wined3d_element_count = convert_to_wined3d_declaration(elements, &declaration->elements_size, + &wined3d_elements, &declaration->stream_map); if (!(declaration->elements = heap_alloc(declaration->elements_size))) { ERR("Failed to allocate vertex declaration elements memory.\n"); @@ -369,6 +373,7 @@ HRESULT d3d8_vertex_declaration_init_fvf(struct d3d8_vertex_declaration *declara declaration->elements = NULL; declaration->elements_size = 0; + declaration->stream_map = 1; declaration->shader_handle = fvf; hr = wined3d_vertex_declaration_create_from_fvf(device->wined3d_device, fvf, declaration,
1
0
0
0
Matteo Bruni : d3d9: Don't upload unused system memory vertex buffers.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 90460f20424424b985fe599a98e32bb61ea6e57e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=90460f20424424b985fe599a…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Mar 5 18:47:19 2019 +0100 d3d9: Don't upload unused system memory vertex buffers. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/d3d9_private.h | 1 + dlls/d3d9/device.c | 8 +++++++- dlls/d3d9/vertexdeclaration.c | 8 ++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index 3fe0376..b07d72a 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -251,6 +251,7 @@ struct d3d9_vertex_declaration LONG refcount; D3DVERTEXELEMENT9 *elements; UINT element_count; + DWORD stream_map; struct wined3d_vertex_declaration *wined3d_declaration; DWORD fvf; IDirect3DDevice9Ex *parent_device; diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 6cc3f18..5d59fd5 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -2730,9 +2730,11 @@ static void d3d9_generate_auto_mipmaps(struct d3d9_device *device) static void d3d9_device_upload_sysmem_vertex_buffers(struct d3d9_device *device, int base_vertex, unsigned int start_vertex, unsigned int vertex_count) { + struct wined3d_vertex_declaration *wined3d_decl; struct wined3d_box box = {0, 0, 0, 1, 0, 1}; struct d3d9_vertexbuffer *d3d9_buffer; struct wined3d_resource *dst_resource; + struct d3d9_vertex_declaration *decl; unsigned int i, offset, stride, map; struct wined3d_buffer *dst_buffer; struct wined3d_resource_desc desc; @@ -2740,13 +2742,17 @@ static void d3d9_device_upload_sysmem_vertex_buffers(struct d3d9_device *device, if (!device->sysmem_vb) return; + wined3d_decl = wined3d_device_get_vertex_declaration(device->wined3d_device); + if (!wined3d_decl) + return; if (base_vertex >= 0 || start_vertex >= -base_vertex) start_vertex += base_vertex; else FIXME("System memory vertex data offset is negative.\n"); - map = device->sysmem_vb; + decl = wined3d_vertex_declaration_get_parent(wined3d_decl); + map = decl->stream_map & device->sysmem_vb; while (map) { i = wined3d_bit_scan(&map); diff --git a/dlls/d3d9/vertexdeclaration.c b/dlls/d3d9/vertexdeclaration.c index b644525..130383e 100644 --- a/dlls/d3d9/vertexdeclaration.c +++ b/dlls/d3d9/vertexdeclaration.c @@ -321,7 +321,7 @@ static const struct wined3d_parent_ops d3d9_vertexdeclaration_wined3d_parent_ops }; static HRESULT convert_to_wined3d_declaration(const D3DVERTEXELEMENT9 *d3d9_elements, - struct wined3d_vertex_element **wined3d_elements, UINT *element_count) + struct wined3d_vertex_element **wined3d_elements, UINT *element_count, DWORD *stream_map) { const D3DVERTEXELEMENT9* element; UINT count = 1; @@ -329,6 +329,8 @@ static HRESULT convert_to_wined3d_declaration(const D3DVERTEXELEMENT9 *d3d9_elem TRACE("d3d9_elements %p, wined3d_elements %p, element_count %p\n", d3d9_elements, wined3d_elements, element_count); + *stream_map = 0; + element = d3d9_elements; while (element++->Stream != 0xff && count++ < 128); @@ -360,6 +362,7 @@ static HRESULT convert_to_wined3d_declaration(const D3DVERTEXELEMENT9 *d3d9_elem (*wined3d_elements)[i].method = d3d9_elements[i].Method; (*wined3d_elements)[i].usage = d3d9_elements[i].Usage; (*wined3d_elements)[i].usage_idx = d3d9_elements[i].UsageIndex; + *stream_map |= 1u << d3d9_elements[i].Stream; } *element_count = count; @@ -375,7 +378,8 @@ static HRESULT vertexdeclaration_init(struct d3d9_vertex_declaration *declaratio UINT element_count; HRESULT hr; - hr = convert_to_wined3d_declaration(elements, &wined3d_elements, &wined3d_element_count); + hr = convert_to_wined3d_declaration(elements, &wined3d_elements, &wined3d_element_count, + &declaration->stream_map); if (FAILED(hr)) { WARN("Failed to create wined3d vertex declaration elements, hr %#x.\n", hr);
1
0
0
0
Nikolay Sivov : d2d1/tests: Add some missing EndDraw() checks (Coverity).
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 414c6b48edc6a655489164cdf097db6081a1c303 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=414c6b48edc6a655489164cd…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 5 13:54:16 2019 +0300 d2d1/tests: Add some missing EndDraw() checks (Coverity). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d2d1/tests/d2d1.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 617977f..2214be6 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -4884,7 +4884,7 @@ static void test_draw_text_layout(void) hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL); todo_wine - ok(hr == D2DERR_WRONG_FACTORY, "EndDraw failure expected, hr %#x.\n", hr); + ok(hr == D2DERR_WRONG_FACTORY, "Unexpected hr %#x.\n", hr); /* Effect is d2d resource, but not a brush. */ set_rect(&rect, 0.0f, 0.0f, 10.0f, 10.0f); @@ -4903,7 +4903,7 @@ todo_wine ID2D1RenderTarget_DrawTextLayout(rt, origin, text_layout, (ID2D1Brush*)brush, D2D1_DRAW_TEXT_OPTIONS_NONE); hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL); - ok(hr == S_OK, "EndDraw failure expected, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr); for (i = 0; i < ARRAY_SIZE(antialias_mode_tests); ++i) { @@ -6576,12 +6576,14 @@ todo_wine ok(SUCCEEDED(hr), "GetDC() was expected to succeed, hr %#x.\n", hr); ok(dc != NULL, "Expected NULL dc, got %p.\n", dc); ID2D1GdiInteropRenderTarget_ReleaseDC(interop, NULL); - ID2D1RenderTarget_EndDraw(rt, NULL, NULL); + hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL); + ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr); ID2D1RenderTarget_BeginDraw(rt); set_color(&color, 1.0f, 0.0f, 0.0f, 1.0f); ID2D1RenderTarget_Clear(rt, &color); - ID2D1RenderTarget_EndDraw(rt, NULL, NULL); + hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL); + ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr); match = compare_wic_bitmap(wic_bitmap, "54034063dbc1c1bb61cb60ec57e4498678dc2b13"); ok(match, "Bitmap does not match.\n"); @@ -6596,7 +6598,8 @@ todo_wine FillRect(dc, &rect, GetStockObject(BLACK_BRUSH)); ID2D1GdiInteropRenderTarget_ReleaseDC(interop, NULL); - ID2D1RenderTarget_EndDraw(rt, NULL, NULL); + hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL); + ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr); match = compare_wic_bitmap(wic_bitmap, "60cacbf3d72e1e7834203da608037b1bf83b40e8"); ok(match, "Bitmap does not match.\n");
1
0
0
0
Andrew Eikum : user32: GetRawInputDeviceInfo uses characters for RIDI_DEVICENAME size.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: d1b19a2d0acad40ab8786f5d75c0cebd52ae6cf2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d1b19a2d0acad40ab8786f5d…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed Mar 6 08:21:32 2019 -0600 user32: GetRawInputDeviceInfo uses characters for RIDI_DEVICENAME size. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/rawinput.c | 41 +++++++++++++++++++++++++++--------- dlls/user32/tests/input.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 83 insertions(+), 11 deletions(-) diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c index b247c15..2085fd3 100644 --- a/dlls/user32/rawinput.c +++ b/dlls/user32/rawinput.c @@ -329,16 +329,37 @@ UINT WINAPI DECLSPEC_HOTPATCH GetRawInputBuffer(RAWINPUT *data, UINT *data_size, */ UINT WINAPI GetRawInputDeviceInfoA(HANDLE device, UINT command, void *data, UINT *data_size) { - UINT ret; - TRACE("device %p, command %#x, data %p, data_size %p.\n", device, command, data, data_size); - ret = GetRawInputDeviceInfoW(device, command, data, data_size); - if (command == RIDI_DEVICENAME && ret && ret != ~0U) - ret = WideCharToMultiByte(CP_ACP, 0, data, -1, data, *data_size, NULL, NULL); + /* RIDI_DEVICENAME data_size is in chars, not bytes */ + if (command == RIDI_DEVICENAME) + { + WCHAR *nameW; + UINT ret, nameW_sz; - return ret; + if (!data_size) return ~0U; + + nameW_sz = *data_size; + + if (data && nameW_sz > 0) + nameW = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * nameW_sz); + else + nameW = NULL; + + ret = GetRawInputDeviceInfoW(device, command, nameW, &nameW_sz); + + if (ret && ret != ~0U) + WideCharToMultiByte(CP_ACP, 0, nameW, -1, data, *data_size, NULL, NULL); + + *data_size = nameW_sz; + + HeapFree(GetProcessHeap(), 0, nameW); + + return ret; + } + + return GetRawInputDeviceInfoW(device, command, data, data_size); } /*********************************************************************** @@ -366,18 +387,18 @@ UINT WINAPI GetRawInputDeviceInfoW(HANDLE device, UINT command, void *data, UINT case RIDI_DEVICENAME: if (device == WINE_MOUSE_HANDLE) { - s = sizeof(mouse_name); + s = ARRAY_SIZE(mouse_name); name = mouse_name; } else if (device == WINE_KEYBOARD_HANDLE) { - s = sizeof(keyboard_name); + s = ARRAY_SIZE(keyboard_name); name = keyboard_name; } else { hid_device = device; - s = (strlenW(hid_device->path) + 1) * sizeof(WCHAR); + s = strlenW(hid_device->path) + 1; name = hid_device->path; } break; @@ -402,7 +423,7 @@ UINT WINAPI GetRawInputDeviceInfoW(HANDLE device, UINT command, void *data, UINT if (command == RIDI_DEVICENAME) { - memcpy(data, name, s); + memcpy(data, name, s * sizeof(WCHAR)); return s; } diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 835dfb1..625de3d 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -80,6 +80,8 @@ static UINT (WINAPI *pSendInput) (UINT, INPUT*, size_t); static BOOL (WINAPI *pGetCurrentInputMessageSource)( INPUT_MESSAGE_SOURCE *source ); static int (WINAPI *pGetMouseMovePointsEx) (UINT, LPMOUSEMOVEPOINT, LPMOUSEMOVEPOINT, int, DWORD); static UINT (WINAPI *pGetRawInputDeviceList) (PRAWINPUTDEVICELIST, PUINT, UINT); +static UINT (WINAPI *pGetRawInputDeviceInfoW) (HANDLE, UINT, void *, UINT *); +static UINT (WINAPI *pGetRawInputDeviceInfoA) (HANDLE, UINT, void *, UINT *); #define MAXKEYEVENTS 12 #define MAXKEYMESSAGES MAXKEYEVENTS /* assuming a key event generates one @@ -164,6 +166,8 @@ static void init_function_pointers(void) GET_PROC(GetCurrentInputMessageSource); GET_PROC(GetMouseMovePointsEx); GET_PROC(GetRawInputDeviceList); + GET_PROC(GetRawInputDeviceInfoW); + GET_PROC(GetRawInputDeviceInfoA); #undef GET_PROC } @@ -1555,7 +1559,7 @@ static void test_GetMouseMovePointsEx(void) static void test_GetRawInputDeviceList(void) { RAWINPUTDEVICELIST devices[32]; - UINT ret, oret, devcount, odevcount; + UINT ret, oret, devcount, odevcount, i; DWORD err; SetLastError(0xdeadbeef); @@ -1587,6 +1591,53 @@ static void test_GetRawInputDeviceList(void) ret = pGetRawInputDeviceList(devices, &devcount, sizeof(devices[0])); ok(ret > 0, "expected non-zero\n"); + for(i = 0; i < devcount; ++i) + { + WCHAR name[128]; + char nameA[128]; + UINT sz, len; + RID_DEVICE_INFO info; + + /* get required buffer size */ + name[0] = '\0'; + sz = 5; + ret = pGetRawInputDeviceInfoW(devices[i].hDevice, RIDI_DEVICENAME, name, &sz); + ok(ret == -1, "GetRawInputDeviceInfo gave wrong failure: %d\n", err); + ok(sz > 5 && sz < ARRAY_SIZE(name), "Size should have been set and not too large (got: %u)\n", sz); + + /* buffer size for RIDI_DEVICENAME is in CHARs, not BYTEs */ + ret = pGetRawInputDeviceInfoW(devices[i].hDevice, RIDI_DEVICENAME, name, &sz); + ok(ret == sz, "GetRawInputDeviceInfo gave wrong return: %d\n", err); + len = lstrlenW(name); + ok(len + 1 == ret, "GetRawInputDeviceInfo returned wrong length (name: %u, ret: %u)\n", len + 1, ret); + + /* test A variant with same size */ + ret = pGetRawInputDeviceInfoA(devices[i].hDevice, RIDI_DEVICENAME, nameA, &sz); + ok(ret == sz, "GetRawInputDeviceInfoA gave wrong return: %d\n", err); + len = strlen(nameA); + ok(len + 1 == ret, "GetRawInputDeviceInfoA returned wrong length (name: %u, ret: %u)\n", len + 1, ret); + + /* buffer size for RIDI_DEVICEINFO is in BYTEs */ + memset(&info, 0, sizeof(info)); + info.cbSize = sizeof(info); + sz = sizeof(info) - 1; + ret = pGetRawInputDeviceInfoW(devices[i].hDevice, RIDI_DEVICEINFO, &info, &sz); + ok(ret == -1, "GetRawInputDeviceInfo gave wrong failure: %d\n", err); + ok(sz == sizeof(info), "GetRawInputDeviceInfo set wrong size\n"); + + ret = pGetRawInputDeviceInfoW(devices[i].hDevice, RIDI_DEVICEINFO, &info, &sz); + ok(ret == sizeof(info), "GetRawInputDeviceInfo gave wrong return: %d\n", err); + ok(sz == sizeof(info), "GetRawInputDeviceInfo set wrong size\n"); + ok(info.dwType == devices[i].dwType, "GetRawInputDeviceInfo set wrong type: 0x%x\n", info.dwType); + + memset(&info, 0, sizeof(info)); + info.cbSize = sizeof(info); + ret = pGetRawInputDeviceInfoA(devices[i].hDevice, RIDI_DEVICEINFO, &info, &sz); + ok(ret == sizeof(info), "GetRawInputDeviceInfo gave wrong return: %d\n", err); + ok(sz == sizeof(info), "GetRawInputDeviceInfo set wrong size\n"); + ok(info.dwType == devices[i].dwType, "GetRawInputDeviceInfo set wrong type: 0x%x\n", info.dwType); + } + /* check if variable changes from larger to smaller value */ devcount = odevcount = ARRAY_SIZE(devices); oret = ret = pGetRawInputDeviceList(devices, &odevcount, sizeof(devices[0]));
1
0
0
0
Nikolay Sivov : include: Define MFT category GUIDs.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 2ed529ca6db582be58fcff489c99a53d35782139 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2ed529ca6db582be58fcff48…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 6 12:42:15 2019 +0300 include: Define MFT category GUIDs. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/tests/mfplat.c | 2 -- include/mfapi.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index c4685a3..2f4db9b 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -55,8 +55,6 @@ DEFINE_GUID(MF_BYTESTREAM_CONTENT_TYPE, 0xfc358289,0x3cb6,0x460c,0xa4,0x24,0xb6, DEFINE_GUID(MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, 0xa634a91c, 0x822b, 0x41b9, 0xa4, 0x94, 0x4d, 0xe4, 0x64, 0x36, 0x12, 0xb0); -DEFINE_GUID(MFT_CATEGORY_OTHER, 0x90175d57,0xb7ea,0x4901,0xae,0xb3,0x93,0x3a,0x87,0x47,0x75,0x6f); - DEFINE_GUID(DUMMY_CLSID, 0x12345678,0x1234,0x1234,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19); DEFINE_GUID(DUMMY_GUID1, 0x12345678,0x1234,0x1234,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21); DEFINE_GUID(DUMMY_GUID2, 0x12345678,0x1234,0x1234,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22); diff --git a/include/mfapi.h b/include/mfapi.h index 4062e2f..0c51627 100644 --- a/include/mfapi.h +++ b/include/mfapi.h @@ -76,6 +76,10 @@ typedef enum _EAllocationType eAllocationTypeIgnore } EAllocationType; +#ifdef MF_INIT_GUIDS +#include <initguid.h> +#endif + DEFINE_GUID(MF_MT_AVG_BITRATE, 0x20332624, 0xfb0d, 0x4d9e, 0xbd, 0x0d, 0xcb, 0xf6, 0x78, 0x6c, 0x10, 0x2e); DEFINE_GUID(MF_MT_FRAME_RATE, 0xc459a2e8, 0x3d2c, 0x4e44, 0xb1, 0x32, 0xfe, 0xe5, 0x15, 0x6c, 0x7b, 0xb0); DEFINE_GUID(MF_MT_FRAME_SIZE, 0x1652c33d, 0xd6b2, 0x4012, 0xb8, 0x34, 0x72, 0x03, 0x08, 0x49, 0xa3, 0x7d); @@ -86,6 +90,17 @@ DEFINE_GUID(MF_MT_SUBTYPE, 0xf7e34c9a, 0x42e8, 0x4714, 0xb7, 0x4b, 0 DEFINE_GUID(MFMediaType_Video, 0x73646976, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); +DEFINE_GUID(MFT_CATEGORY_VIDEO_DECODER, 0xd6c02d4b, 0x6833, 0x45b4, 0x97, 0x1a, 0x05, 0xa4, 0xb0, 0x4b, 0xab, 0x91); +DEFINE_GUID(MFT_CATEGORY_VIDEO_ENCODER, 0xf79eac7d, 0xe545, 0x4387, 0xbd, 0xee, 0xd6, 0x47, 0xd7, 0xbd, 0xe4, 0x2a); +DEFINE_GUID(MFT_CATEGORY_VIDEO_EFFECT, 0x12e17c21, 0x532c, 0x4a6e, 0x8a, 0x1c, 0x40, 0x82, 0x5a, 0x73, 0x63, 0x97); +DEFINE_GUID(MFT_CATEGORY_MULTIPLEXER, 0x059c561e, 0x05ae, 0x4b61, 0xb6, 0x9d, 0x55, 0xb6, 0x1e, 0xe5, 0x4a, 0x7b); +DEFINE_GUID(MFT_CATEGORY_DEMULTIPLEXER, 0xa8700a7a, 0x939b, 0x44c5, 0x99, 0xd7, 0x76, 0x22, 0x6b, 0x23, 0xb3, 0xf1); +DEFINE_GUID(MFT_CATEGORY_AUDIO_DECODER, 0x9ea73fb4, 0xef7a, 0x4559, 0x8d, 0x5d, 0x71, 0x9d, 0x8f, 0x04, 0x26, 0xc7); +DEFINE_GUID(MFT_CATEGORY_AUDIO_ENCODER, 0x91c64bd0, 0xf91e, 0x4d8c, 0x92, 0x76, 0xdb, 0x24, 0x82, 0x79, 0xd9, 0x75); +DEFINE_GUID(MFT_CATEGORY_AUDIO_EFFECT, 0x11064c48, 0x3648, 0x4ed0, 0x93, 0x2e, 0x05, 0xce, 0x8a, 0xc8, 0x11, 0xb7); +DEFINE_GUID(MFT_CATEGORY_VIDEO_PROCESSOR, 0x302ea3fc, 0xaa5f, 0x47f9, 0x9f, 0x7a, 0xc2, 0x18, 0x8b, 0xb1, 0x63, 0x02); +DEFINE_GUID(MFT_CATEGORY_OTHER, 0x90175d57, 0xb7ea, 0x4901, 0xae, 0xb3, 0x93, 0x3a, 0x87, 0x47, 0x75, 0x6f); + typedef unsigned __int64 MFWORKITEM_KEY; typedef enum
1
0
0
0
Nikolay Sivov : mfplat: Implement time source state changes.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 3865a8c9d5633b9f9c71ed39ab74aba6308f31cd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3865a8c9d5633b9f9c71ed39…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 6 12:42:14 2019 +0300 mfplat: Implement time source state changes. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/main.c | 112 +++++++++++++++++++++++++++++++++++++++------ dlls/mfplat/tests/mfplat.c | 65 +++++++++++++++++++++++++- 2 files changed, 162 insertions(+), 15 deletions(-) diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index 4ce97b1..6bec418 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -1,5 +1,4 @@ /* - * * Copyright 2014 Austin English * * This library is free software; you can redistribute it and/or @@ -44,6 +43,8 @@ struct system_time_source IMFPresentationTimeSource IMFPresentationTimeSource_iface; IMFClockStateSink IMFClockStateSink_iface; LONG refcount; + MFCLOCK_STATE state; + CRITICAL_SECTION cs; }; static struct system_time_source *impl_from_IMFPresentationTimeSource(IMFPresentationTimeSource *iface) @@ -3085,7 +3086,10 @@ static ULONG WINAPI system_time_source_Release(IMFPresentationTimeSource *iface) TRACE("%p, refcount %u.\n", iface, refcount); if (!refcount) + { + DeleteCriticalSection(&source->cs); heap_free(source); + } return refcount; } @@ -3120,9 +3124,15 @@ static HRESULT WINAPI system_time_source_GetContinuityKey(IMFPresentationTimeSou static HRESULT WINAPI system_time_source_GetState(IMFPresentationTimeSource *iface, DWORD reserved, MFCLOCK_STATE *state) { - FIXME("%p, %#x, %p.\n", iface, reserved, state); + struct system_time_source *source = impl_from_IMFPresentationTimeSource(iface); - return E_NOTIMPL; + TRACE("%p, %#x, %p.\n", iface, reserved, state); + + EnterCriticalSection(&source->cs); + *state = source->state; + LeaveCriticalSection(&source->cs); + + return S_OK; } static HRESULT WINAPI system_time_source_GetProperties(IMFPresentationTimeSource *iface, MFCLOCK_PROPERTIES *props) @@ -3170,32 +3180,107 @@ static ULONG WINAPI system_time_source_sink_Release(IMFClockStateSink *iface) return IMFPresentationTimeSource_Release(&source->IMFPresentationTimeSource_iface); } -static HRESULT WINAPI system_time_source_sink_OnClockStart(IMFClockStateSink *iface, MFTIME system_time, LONGLONG start_offset) +enum clock_command { - FIXME("%p, %s, %s.\n", iface, wine_dbgstr_longlong(system_time), wine_dbgstr_longlong(start_offset)); + CLOCK_CMD_START = 0, + CLOCK_CMD_STOP, + CLOCK_CMD_PAUSE, + CLOCK_CMD_RESTART, + CLOCK_CMD_MAX, +}; - return E_NOTIMPL; +static HRESULT system_time_source_change_state(struct system_time_source *source, enum clock_command command) +{ + static const BYTE state_change_is_allowed[MFCLOCK_STATE_PAUSED+1][CLOCK_CMD_MAX] = + { /* S S* P R */ + /* INVALID */ { 1, 0, 1, 0 }, + /* RUNNING */ { 1, 1, 1, 0 }, + /* STOPPED */ { 1, 1, 0, 0 }, + /* PAUSED */ { 1, 1, 0, 1 }, + }; + static const MFCLOCK_STATE states[CLOCK_CMD_MAX] = + { + /* CLOCK_CMD_START */ MFCLOCK_STATE_RUNNING, + /* CLOCK_CMD_STOP */ MFCLOCK_STATE_STOPPED, + /* CLOCK_CMD_PAUSE */ MFCLOCK_STATE_PAUSED, + /* CLOCK_CMD_RESTART */ MFCLOCK_STATE_RUNNING, + }; + + /* Special case that go against usual state change vs return value behavior. */ + if (source->state == MFCLOCK_STATE_INVALID && command == CLOCK_CMD_STOP) + return S_OK; + + if (!state_change_is_allowed[source->state][command]) + return MF_E_INVALIDREQUEST; + + source->state = states[command]; + + return S_OK; +} + +static HRESULT WINAPI system_time_source_sink_OnClockStart(IMFClockStateSink *iface, MFTIME system_time, + LONGLONG start_offset) +{ + struct system_time_source *source = impl_from_IMFClockStateSink(iface); + HRESULT hr; + + TRACE("%p, %s, %s.\n", iface, wine_dbgstr_longlong(system_time), wine_dbgstr_longlong(start_offset)); + + EnterCriticalSection(&source->cs); + hr = system_time_source_change_state(source, CLOCK_CMD_START); + LeaveCriticalSection(&source->cs); + + /* FIXME: update timestamps */ + + return hr; } static HRESULT WINAPI system_time_source_sink_OnClockStop(IMFClockStateSink *iface, MFTIME system_time) { - FIXME("%p, %s.\n", iface, wine_dbgstr_longlong(system_time)); + struct system_time_source *source = impl_from_IMFClockStateSink(iface); + HRESULT hr; - return E_NOTIMPL; + TRACE("%p, %s.\n", iface, wine_dbgstr_longlong(system_time)); + + EnterCriticalSection(&source->cs); + hr = system_time_source_change_state(source, CLOCK_CMD_STOP); + LeaveCriticalSection(&source->cs); + + /* FIXME: update timestamps */ + + return hr; } static HRESULT WINAPI system_time_source_sink_OnClockPause(IMFClockStateSink *iface, MFTIME system_time) { - FIXME("%p, %s.\n", iface, wine_dbgstr_longlong(system_time)); + struct system_time_source *source = impl_from_IMFClockStateSink(iface); + HRESULT hr; - return E_NOTIMPL; + TRACE("%p, %s.\n", iface, wine_dbgstr_longlong(system_time)); + + EnterCriticalSection(&source->cs); + hr = system_time_source_change_state(source, CLOCK_CMD_PAUSE); + LeaveCriticalSection(&source->cs); + + /* FIXME: update timestamps */ + + return hr; } static HRESULT WINAPI system_time_source_sink_OnClockRestart(IMFClockStateSink *iface, MFTIME system_time) { - FIXME("%p, %s.\n", iface, wine_dbgstr_longlong(system_time)); + struct system_time_source *source = impl_from_IMFClockStateSink(iface); + HRESULT hr; - return E_NOTIMPL; + TRACE("%p, %s.\n", iface, wine_dbgstr_longlong(system_time)); + + EnterCriticalSection(&source->cs); + hr = system_time_source_change_state(source, CLOCK_CMD_RESTART); + LeaveCriticalSection(&source->cs); + + /* FIXME: update timestamps */ + + return hr; } static HRESULT WINAPI system_time_source_sink_OnClockSetRate(IMFClockStateSink *iface, MFTIME system_time, float rate) @@ -3226,13 +3311,14 @@ HRESULT WINAPI MFCreateSystemTimeSource(IMFPresentationTimeSource **time_source) TRACE("%p.\n", time_source); - object = heap_alloc(sizeof(*object)); + object = heap_alloc_zero(sizeof(*object)); if (!object) return E_OUTOFMEMORY; object->IMFPresentationTimeSource_iface.lpVtbl = &systemtimesourcevtbl; object->IMFClockStateSink_iface.lpVtbl = &systemtimesourcesinkvtbl; object->refcount = 1; + InitializeCriticalSection(&object->cs); *time_source = &object->IMFPresentationTimeSource_iface; diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index cb3f2a9..c4685a3 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -1598,11 +1598,46 @@ static void test_presentation_descriptor(void) IMFMediaType_Release(media_type); } +enum clock_action +{ + CLOCK_START, + CLOCK_STOP, + CLOCK_PAUSE, + CLOCK_RESTART, +}; + static void test_system_time_source(void) { + static const struct clock_state_test + { + enum clock_action action; + MFCLOCK_STATE state; + BOOL is_invalid; + } + clock_state_change[] = + { + { CLOCK_STOP, MFCLOCK_STATE_INVALID }, + { CLOCK_RESTART, MFCLOCK_STATE_INVALID, TRUE }, + { CLOCK_PAUSE, MFCLOCK_STATE_PAUSED }, + { CLOCK_PAUSE, MFCLOCK_STATE_PAUSED, TRUE }, + { CLOCK_STOP, MFCLOCK_STATE_STOPPED }, + { CLOCK_STOP, MFCLOCK_STATE_STOPPED }, + { CLOCK_RESTART, MFCLOCK_STATE_STOPPED, TRUE }, + { CLOCK_START, MFCLOCK_STATE_RUNNING }, + { CLOCK_START, MFCLOCK_STATE_RUNNING }, + { CLOCK_RESTART, MFCLOCK_STATE_RUNNING, TRUE }, + { CLOCK_PAUSE, MFCLOCK_STATE_PAUSED }, + { CLOCK_START, MFCLOCK_STATE_RUNNING }, + { CLOCK_PAUSE, MFCLOCK_STATE_PAUSED }, + { CLOCK_RESTART, MFCLOCK_STATE_RUNNING }, + { CLOCK_RESTART, MFCLOCK_STATE_RUNNING, TRUE }, + { CLOCK_STOP, MFCLOCK_STATE_STOPPED }, + { CLOCK_PAUSE, MFCLOCK_STATE_STOPPED, TRUE }, + }; IMFPresentationTimeSource *time_source; IMFClockStateSink *statesink; MFCLOCK_STATE state; + unsigned int i; DWORD value; HRESULT hr; @@ -1620,12 +1655,38 @@ static void test_system_time_source(void) ok(value == 0, "Unexpected value %u.\n", value); hr = IMFPresentationTimeSource_GetState(time_source, 0, &state); -todo_wine { ok(hr == S_OK, "Failed to get state, hr %#x.\n", hr); ok(state == MFCLOCK_STATE_INVALID, "Unexpected state %d.\n", state); -} + hr = IMFPresentationTimeSource_QueryInterface(time_source, &IID_IMFClockStateSink, (void **)&statesink); ok(hr == S_OK, "Failed to get state sink, hr %#x.\n", hr); + + /* State changes. */ + for (i = 0; i < ARRAY_SIZE(clock_state_change); ++i) + { + switch (clock_state_change[i].action) + { + case CLOCK_STOP: + hr = IMFClockStateSink_OnClockStop(statesink, 0); + break; + case CLOCK_RESTART: + hr = IMFClockStateSink_OnClockRestart(statesink, 0); + break; + case CLOCK_PAUSE: + hr = IMFClockStateSink_OnClockPause(statesink, 0); + break; + case CLOCK_START: + hr = IMFClockStateSink_OnClockStart(statesink, 0, 0); + break; + default: + ; + } + ok(hr == (clock_state_change[i].is_invalid ? MF_E_INVALIDREQUEST : S_OK), "%u: unexpected hr %#x.\n", i, hr); + hr = IMFPresentationTimeSource_GetState(time_source, 0, &state); + ok(hr == S_OK, "%u: failed to get state, hr %#x.\n", i, hr); + ok(state == clock_state_change[i].state, "%u: unexpected state %d.\n", i, state); + } + IMFClockStateSink_Release(statesink); IMFPresentationTimeSource_Release(time_source);
1
0
0
0
Nikolay Sivov : mfplat: Add a stub for system time source.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 58a93786e260586b6b92a0a4e197ed5c43a1513b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=58a93786e260586b6b92a0a4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 6 12:42:13 2019 +0300 mfplat: Add a stub for system time source. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/main.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ dlls/mfplat/mfplat.spec | 2 +- dlls/mfplat/tests/mfplat.c | 34 +++++++ include/mfidl.idl | 8 ++ 4 files changed, 258 insertions(+), 1 deletion(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=58a93786e260586b6b92…
1
0
0
0
Nikolay Sivov : mfplat: Fix a leak on error path (Coverity).
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 3fb0b48e1ea85beab3656abf4f3f8b9c842445bb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3fb0b48e1ea85beab3656abf…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 6 12:42:12 2019 +0300 mfplat: Fix a leak on error path (Coverity). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/queue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/mfplat/queue.c b/dlls/mfplat/queue.c index 96dd6de..408526f 100644 --- a/dlls/mfplat/queue.c +++ b/dlls/mfplat/queue.c @@ -577,6 +577,8 @@ static HRESULT alloc_user_queue(MFASYNC_WORKQUEUE_TYPE queue_type, DWORD *queue_ else { LeaveCriticalSection(&queues_section); + heap_free(queue); + WARN("Out of user queue handles.\n"); return E_OUTOFMEMORY; }
1
0
0
0
Nikolay Sivov : mfplat: Fix potential invalid memory access (Coverity).
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: cb4d45adfd4b82ef4fc24cd7860f0c6d5e36b080 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cb4d45adfd4b82ef4fc24cd7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Mar 6 12:42:11 2019 +0300 mfplat: Fix potential invalid memory access (Coverity). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/queue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/mfplat/queue.c b/dlls/mfplat/queue.c index 1b9ef38..96dd6de 100644 --- a/dlls/mfplat/queue.c +++ b/dlls/mfplat/queue.c @@ -185,6 +185,8 @@ static HRESULT grab_queue(DWORD queue_id, struct queue **ret) MFASYNC_WORKQUEUE_TYPE queue_type; struct queue_handle *entry; + *ret = NULL; + if (!system_queues[SYS_QUEUE_STANDARD].pool) return MF_E_SHUTDOWN;
1
0
0
0
← Newer
1
...
77
78
79
80
81
82
83
...
110
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
101
102
103
104
105
106
107
108
109
110
Results per page:
10
25
50
100
200