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
May 2022
----- 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
907 discussions
Start a n
N
ew thread
Matteo Bruni : wined3d: Add some state table consistency checking to context_invalidate_state().
by Alexandre Julliard
24 May '22
24 May '22
Module: wine Branch: master Commit: 80eef0039b0e5bdb11a9343312325d1745bfcc60 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=80eef0039b0e5bdb11a93433…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Sun Apr 3 17:31:43 2022 +0200 wined3d: Add some state table consistency checking to context_invalidate_state(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> --- dlls/wined3d/context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 8c4277bc7ca..f9af58936a6 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -78,6 +78,9 @@ void context_invalidate_state(struct wined3d_context *context, unsigned int stat unsigned int representative = context->state_table[state_id].representative; unsigned int index, shift; + if (!representative) + ERR("Invalidating representative 0, state_id %u.\n", state_id); + index = representative / (sizeof(*context->dirty_graphics_states) * CHAR_BIT); shift = representative & ((sizeof(*context->dirty_graphics_states) * CHAR_BIT) - 1); context->dirty_graphics_states[index] |= (1u << shift);
1
0
0
0
Matteo Bruni : wined3d: Assert that the CS queue size is a power of two.
by Alexandre Julliard
24 May '22
24 May '22
Module: wine Branch: master Commit: 192695d1db4ceefff8c91e2743f9bb36353e940e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=192695d1db4ceefff8c91e27…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Apr 6 13:00:58 2022 +0200 wined3d: Assert that the CS queue size is a power of two. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> --- dlls/wined3d/wined3d_private.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 00d2cfea8e4..4d208260fbf 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4976,6 +4976,8 @@ enum wined3d_push_constants #define WINED3D_CS_SPIN_COUNT 10000000u #define WINED3D_CS_QUEUE_MASK (WINED3D_CS_QUEUE_SIZE - 1) +C_ASSERT(!(WINED3D_CS_QUEUE_SIZE & (WINED3D_CS_QUEUE_SIZE - 1))); + struct wined3d_cs_queue { ULONG head, tail;
1
0
0
0
Matteo Bruni : wined3d: Allow blits with fixups in the FFP blitter without a shader backend.
by Alexandre Julliard
24 May '22
24 May '22
Module: wine Branch: master Commit: 6247bee483b31b1ea0ad49f85f1cffde7433fed2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6247bee483b31b1ea0ad49f8…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue May 17 19:54:09 2022 +0200 wined3d: Allow blits with fixups in the FFP blitter without a shader backend. Along the lines of d37146885801ae384a1cae54edea426b7b58a6a9 but for the no shader backend case. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> --- dlls/wined3d/texture.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 595baf07788..c952f366a68 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -5753,10 +5753,13 @@ static bool ffp_blit_supported(enum wined3d_blit_op blit_op, const struct wined3 if (!is_identity_fixup(src_format->color_fixup) || !is_identity_fixup(dst_format->color_fixup)) { - if (wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER - && dst_format->id == src_format->id && dst_location == WINED3D_LOCATION_DRAWABLE) + if (dst_format->id == src_format->id && dst_location == WINED3D_LOCATION_DRAWABLE) { - WARN("Claiming fixup support because of ORM_BACKBUFFER.\n"); + if (wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER) + WARN("Claiming fixup support because of ORM_BACKBUFFER.\n"); + else if (context->device->shader_backend == &none_shader_backend) + WARN("Claiming fixup support because of no shader backend.\n"); + return true; } else {
1
0
0
0
Matteo Bruni : d3d9/tests: Fix typo.
by Alexandre Julliard
24 May '22
24 May '22
Module: wine Branch: master Commit: 89011e6f0a3ef888d6faaa4ad2ae0cebb714cc4d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=89011e6f0a3ef888d6faaa4a…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Sun Apr 3 17:31:15 2022 +0200 d3d9/tests: Fix typo. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> --- dlls/d3d9/tests/visual.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index f20f1ecb369..2913583916a 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -1193,7 +1193,7 @@ static void clear_test(void) ok(color == 0x0000ff00, "(322,242) has color %08x\n", color); color = getPixelColor(device, 478, 358); - ok(color == 0x0000ff00, "(478,358 has color %08x\n", color); + ok(color == 0x0000ff00, "(478,358) has color %08x\n", color); color = getPixelColor(device, 482, 358); ok(color == 0x00ffffff, "(482,358) has color %08x\n", color); color = getPixelColor(device, 478, 362);
1
0
0
0
Matteo Bruni : wined3d: Don't touch GL sRGB decode state when not supported.
by Alexandre Julliard
24 May '22
24 May '22
Module: wine Branch: master Commit: 6c820bbcf07c8efd558abfafbb294f90b595e405 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6c820bbcf07c8efd558abfaf…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Sun Apr 3 17:30:00 2022 +0200 wined3d: Don't touch GL sRGB decode state when not supported. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> --- dlls/wined3d/view.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c index dbd385219f0..c502fcba992 100644 --- a/dlls/wined3d/view.c +++ b/dlls/wined3d/view.c @@ -1306,7 +1306,8 @@ void wined3d_shader_resource_view_gl_generate_mipmap(struct wined3d_shader_resou if (gl_info->supported[ARB_SAMPLER_OBJECTS]) GL_EXTCALL(glBindSampler(context_gl->active_texture, 0)); gl_tex = wined3d_texture_gl_get_gl_texture(texture_gl, srgb); - if (context_gl->c.d3d_info->wined3d_creation_flags & WINED3D_SRGB_READ_WRITE_CONTROL) + if (context_gl->c.d3d_info->wined3d_creation_flags & WINED3D_SRGB_READ_WRITE_CONTROL + && gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) { gl_info->gl_ops.gl.p_glTexParameteri(texture_gl->target, GL_TEXTURE_SRGB_DECODE_EXT, GL_SKIP_DECODE_EXT);
1
0
0
0
Huw Davies : gdi32: Free the client-side emf dc info.
by Alexandre Julliard
24 May '22
24 May '22
Module: wine Branch: master Commit: 6a9a80679d7b0cfe2b83727caf48809ba2280ea1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6a9a80679d7b0cfe2b83727c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue May 24 12:25:08 2022 +0100 gdi32: Free the client-side emf dc info. Signed-off-by: Huw Davies <huw(a)codeweavers.com> --- dlls/gdi32/emfdc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/gdi32/emfdc.c b/dlls/gdi32/emfdc.c index d215162d8d0..56327abff8a 100644 --- a/dlls/gdi32/emfdc.c +++ b/dlls/gdi32/emfdc.c @@ -2321,6 +2321,8 @@ void EMFDC_DeleteDC( DC_ATTR *dc_attr ) if (emf->handles[index]) GDI_hdc_not_using_object( emf->handles[index], emf->dc_attr->hdc ); HeapFree( GetProcessHeap(), 0, emf->handles ); + HeapFree( GetProcessHeap(), 0, emf ); + dc_attr->emf = NULL; } /*******************************************************************
1
0
0
0
Huw Davies : gdi32: Remove second initialization of emf->dc_attr.
by Alexandre Julliard
24 May '22
24 May '22
Module: wine Branch: master Commit: 0c8a076e78c033768cbb259f3220a3a64b4ed686 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0c8a076e78c033768cbb259f…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue May 24 12:23:15 2022 +0100 gdi32: Remove second initialization of emf->dc_attr. Signed-off-by: Huw Davies <huw(a)codeweavers.com> --- dlls/gdi32/emfdc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dlls/gdi32/emfdc.c b/dlls/gdi32/emfdc.c index eec700de327..d215162d8d0 100644 --- a/dlls/gdi32/emfdc.c +++ b/dlls/gdi32/emfdc.c @@ -2426,7 +2426,6 @@ HDC WINAPI CreateEnhMetaFileW( HDC hdc, const WCHAR *filename, const RECT *rect, DeleteDC( ret ); return 0; } - emf->dc_attr = dc_attr; emf->handles = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, HANDLE_LIST_INC * sizeof(emf->handles[0]) );
1
0
0
0
Bernhard Kölbl : windows.media.speech: Make IAsyncAction concurrent.
by Alexandre Julliard
24 May '22
24 May '22
Module: wine Branch: master Commit: c6ab933bc3433dfa86d6a05c7a8b7d2bc7ef19de URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c6ab933bc3433dfa86d6a05c…
Author: Bernhard Kölbl <besentv(a)gmail.com> Date: Tue May 3 16:34:55 2022 +0200 windows.media.speech: Make IAsyncAction concurrent. Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com> --- dlls/windows.media.speech/async.c | 75 ++++++++++++++++++++++++++++++++-- dlls/windows.media.speech/private.h | 3 +- dlls/windows.media.speech/recognizer.c | 7 +++- 3 files changed, 80 insertions(+), 5 deletions(-) diff --git a/dlls/windows.media.speech/async.c b/dlls/windows.media.speech/async.c index 3d67b90060e..5d20fe482f1 100644 --- a/dlls/windows.media.speech/async.c +++ b/dlls/windows.media.speech/async.c @@ -40,6 +40,11 @@ struct async_void IAsyncActionCompletedHandler *handler; + async_action_callback callback; + TP_WORK *async_run_work; + IInspectable *invoker; + + CRITICAL_SECTION cs; AsyncStatus status; HRESULT hr; }; @@ -116,6 +121,7 @@ HRESULT WINAPI async_void_put_Completed( IAsyncAction *iface, IAsyncActionComple TRACE("iface %p, handler %p.\n", iface, handler); + EnterCriticalSection(&impl->cs); if (impl->status == Closed) hr = E_ILLEGAL_METHOD_CALL; else if (impl->handler != HANDLER_NOT_SET) @@ -133,11 +139,15 @@ HRESULT WINAPI async_void_put_Completed( IAsyncAction *iface, IAsyncActionComple IAsyncAction *action = &impl->IAsyncAction_iface; AsyncStatus status = impl->status; impl->handler = NULL; /* Prevent concurrent invoke. */ + LeaveCriticalSection(&impl->cs); IAsyncActionCompletedHandler_Invoke(handler, action, status); IAsyncActionCompletedHandler_Release(handler); + + return S_OK; } } + LeaveCriticalSection(&impl->cs); return hr; } @@ -149,9 +159,11 @@ HRESULT WINAPI async_void_get_Completed( IAsyncAction *iface, IAsyncActionComple FIXME("iface %p, handler %p semi stub!\n", iface, handler); + EnterCriticalSection(&impl->cs); if (impl->status == Closed) hr = E_ILLEGAL_METHOD_CALL; *handler = (impl->handler != HANDLER_NOT_SET) ? impl->handler : NULL; + LeaveCriticalSection(&impl->cs); return hr; } @@ -200,9 +212,11 @@ static HRESULT WINAPI async_void_info_get_Status( IAsyncInfo *iface, AsyncStatus TRACE("iface %p, status %p.\n", iface, status); + EnterCriticalSection(&impl->cs); if (impl->status == Closed) hr = E_ILLEGAL_METHOD_CALL; *status = impl->status; + LeaveCriticalSection(&impl->cs); return hr; } @@ -214,10 +228,12 @@ static HRESULT WINAPI async_void_info_get_ErrorCode( IAsyncInfo *iface, HRESULT TRACE("iface %p, error_code %p.\n", iface, error_code); + EnterCriticalSection(&impl->cs); if (impl->status == Closed) *error_code = hr = E_ILLEGAL_METHOD_CALL; else *error_code = impl->hr; + LeaveCriticalSection(&impl->cs); return hr; } @@ -229,10 +245,12 @@ static HRESULT WINAPI async_void_info_Cancel( IAsyncInfo *iface ) TRACE("iface %p.\n", iface); + EnterCriticalSection(&impl->cs); if (impl->status == Closed) hr = E_ILLEGAL_METHOD_CALL; else if (impl->status == Started) impl->status = Canceled; + LeaveCriticalSection(&impl->cs); return hr; } @@ -244,10 +262,16 @@ static HRESULT WINAPI async_void_info_Close( IAsyncInfo *iface ) TRACE("iface %p.\n", iface); + EnterCriticalSection(&impl->cs); if (impl->status == Started) hr = E_ILLEGAL_STATE_CHANGE; else if (impl->status != Closed) + { + CloseThreadpoolWork(impl->async_run_work); + impl->async_run_work = NULL; impl->status = Closed; + } + LeaveCriticalSection(&impl->cs); return hr; } @@ -270,11 +294,40 @@ static const struct IAsyncInfoVtbl async_void_info_vtbl = async_void_info_Close }; -HRESULT async_action_create( IAsyncAction **out ) +static void CALLBACK async_void_run_cb(TP_CALLBACK_INSTANCE *instance, void *data, TP_WORK *work) +{ + IAsyncAction *action = data; + struct async_void *impl = impl_from_IAsyncAction(action); + HRESULT hr; + + hr = impl->callback(impl->invoker); + + EnterCriticalSection(&impl->cs); + if (impl->status < Closed) + impl->status = FAILED(hr) ? Error : Completed; + + impl->hr = hr; + + if (impl->handler != NULL && impl->handler != HANDLER_NOT_SET) + { + IAsyncActionCompletedHandler*handler = impl->handler; + AsyncStatus status = impl->status; + impl->handler = NULL; /* Prevent concurrent invoke. */ + LeaveCriticalSection(&impl->cs); + + IAsyncActionCompletedHandler_Invoke(handler, action, status); + IAsyncActionCompletedHandler_Release(handler); + } + else LeaveCriticalSection(&impl->cs); + + IAsyncAction_Release(action); +} + +HRESULT async_action_create( IInspectable *invoker, async_action_callback callback, IAsyncAction **out ) { struct async_void *impl; - TRACE("out %p.\n", out); + TRACE("invoker %p, callback %p, out %p.\n", invoker, callback, out); if (!(impl = calloc(1, sizeof(*impl)))) { @@ -287,7 +340,23 @@ HRESULT async_action_create( IAsyncAction **out ) impl->ref = 1; impl->handler = HANDLER_NOT_SET; - impl->status = Completed; + impl->callback = callback; + impl->status = Started; + + if (!(impl->async_run_work = CreateThreadpoolWork(async_void_run_cb, &impl->IAsyncAction_iface, NULL))) + { + free(impl); + return HRESULT_FROM_WIN32(GetLastError()); + } + + if (invoker) IInspectable_AddRef((impl->invoker = invoker)); + + InitializeCriticalSection(&impl->cs); + impl->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": async_action.cs"); + + /* AddRef to keep the obj alive in the callback. */ + IAsyncAction_AddRef(&impl->IAsyncAction_iface); + SubmitThreadpoolWork(impl->async_run_work); *out = &impl->IAsyncAction_iface; TRACE("created %p\n", *out); diff --git a/dlls/windows.media.speech/private.h b/dlls/windows.media.speech/private.h index ba8e942fe5f..13964329697 100644 --- a/dlls/windows.media.speech/private.h +++ b/dlls/windows.media.speech/private.h @@ -69,9 +69,10 @@ struct vector_iids const GUID *view; }; +typedef HRESULT (WINAPI *async_action_callback)( IInspectable *invoker ); typedef HRESULT (WINAPI *async_operation_inspectable_callback)( IInspectable *invoker, IInspectable **result ); -HRESULT async_action_create( IAsyncAction **out ); +HRESULT async_action_create( IInspectable *invoker, async_action_callback callback, IAsyncAction **out ); HRESULT async_operation_inspectable_create( const GUID *iid, IInspectable *invoker, async_operation_inspectable_callback callback, IAsyncOperation_IInspectable **out ); diff --git a/dlls/windows.media.speech/recognizer.c b/dlls/windows.media.speech/recognizer.c index 853e9eb9830..6a058df86e5 100644 --- a/dlls/windows.media.speech/recognizer.c +++ b/dlls/windows.media.speech/recognizer.c @@ -244,10 +244,15 @@ static HRESULT WINAPI session_set_AutoStopSilenceTimeout( ISpeechContinuousRecog return E_NOTIMPL; } +static HRESULT WINAPI start_callback( IInspectable *invoker ) +{ + return S_OK; +} + static HRESULT WINAPI session_StartAsync( ISpeechContinuousRecognitionSession *iface, IAsyncAction **action ) { FIXME("iface %p, action %p stub!\n", iface, action); - return async_action_create(action); + return async_action_create(NULL, start_callback, action); } static HRESULT WINAPI session_StartWithModeAsync( ISpeechContinuousRecognitionSession *iface,
1
0
0
0
Bernhard Kölbl : windows.media.speech: Partially implement IAsyncAction.
by Alexandre Julliard
24 May '22
24 May '22
Module: wine Branch: master Commit: 1438b1b6636f5c821b0545d43d9de4343a45eece URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1438b1b6636f5c821b0545d4…
Author: Bernhard Kölbl <besentv(a)gmail.com> Date: Mon May 2 22:56:13 2022 +0200 windows.media.speech: Partially implement IAsyncAction. Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com> --- dlls/windows.media.speech/async.c | 103 +++++++++++++++++++++++++++---- dlls/windows.media.speech/tests/speech.c | 16 ++--- 2 files changed, 99 insertions(+), 20 deletions(-) diff --git a/dlls/windows.media.speech/async.c b/dlls/windows.media.speech/async.c index d7ac090be78..3d67b90060e 100644 --- a/dlls/windows.media.speech/async.c +++ b/dlls/windows.media.speech/async.c @@ -37,6 +37,11 @@ struct async_void IAsyncAction IAsyncAction_iface; IAsyncInfo IAsyncInfo_iface; LONG ref; + + IAsyncActionCompletedHandler *handler; + + AsyncStatus status; + HRESULT hr; }; static inline struct async_void *impl_from_IAsyncAction( IAsyncAction *iface ) @@ -106,20 +111,56 @@ HRESULT WINAPI async_void_GetTrustLevel( IAsyncAction *iface, TrustLevel *trust_ HRESULT WINAPI async_void_put_Completed( IAsyncAction *iface, IAsyncActionCompletedHandler *handler ) { - FIXME("iface %p, handler %p stub!\n", iface, handler); - return E_NOTIMPL; + struct async_void *impl = impl_from_IAsyncAction(iface); + HRESULT hr = S_OK; + + TRACE("iface %p, handler %p.\n", iface, handler); + + if (impl->status == Closed) + hr = E_ILLEGAL_METHOD_CALL; + else if (impl->handler != HANDLER_NOT_SET) + hr = E_ILLEGAL_DELEGATE_ASSIGNMENT; + /* + impl->handler can only be set once with async_operation_put_Completed, + so by default we set a non HANDLER_NOT_SET value, in this case handler. + */ + else if ((impl->handler = handler)) + { + IAsyncActionCompletedHandler_AddRef(impl->handler); + + if (impl->status > Started) + { + IAsyncAction *action = &impl->IAsyncAction_iface; + AsyncStatus status = impl->status; + impl->handler = NULL; /* Prevent concurrent invoke. */ + + IAsyncActionCompletedHandler_Invoke(handler, action, status); + IAsyncActionCompletedHandler_Release(handler); + } + } + + return hr; } HRESULT WINAPI async_void_get_Completed( IAsyncAction *iface, IAsyncActionCompletedHandler **handler ) { - FIXME("iface %p, handler %p stub!\n", iface, handler); - return E_NOTIMPL; + struct async_void *impl = impl_from_IAsyncAction(iface); + HRESULT hr = S_OK; + + FIXME("iface %p, handler %p semi stub!\n", iface, handler); + + if (impl->status == Closed) + hr = E_ILLEGAL_METHOD_CALL; + *handler = (impl->handler != HANDLER_NOT_SET) ? impl->handler : NULL; + + return hr; } HRESULT WINAPI async_void_GetResults( IAsyncAction *iface ) { - FIXME("iface %p stub!\n", iface); - return E_NOTIMPL; + /* According to the docs, this function doesn't return anything, so it's left empty. */ + TRACE("iface %p.\n", iface); + return S_OK; } static const struct IAsyncActionVtbl async_void_vtbl = @@ -154,26 +195,61 @@ static HRESULT WINAPI async_void_info_get_Id( IAsyncInfo *iface, UINT32 *id ) static HRESULT WINAPI async_void_info_get_Status( IAsyncInfo *iface, AsyncStatus *status ) { - FIXME("iface %p, status %p.\n", iface, status); - return E_NOTIMPL; + struct async_void *impl = impl_from_async_void_IAsyncInfo(iface); + HRESULT hr = S_OK; + + TRACE("iface %p, status %p.\n", iface, status); + + if (impl->status == Closed) + hr = E_ILLEGAL_METHOD_CALL; + *status = impl->status; + + return hr; } static HRESULT WINAPI async_void_info_get_ErrorCode( IAsyncInfo *iface, HRESULT *error_code ) { - FIXME("iface %p, error_code %p.\n", iface, error_code); - return E_NOTIMPL; + struct async_void *impl = impl_from_async_void_IAsyncInfo(iface); + HRESULT hr = S_OK; + + TRACE("iface %p, error_code %p.\n", iface, error_code); + + if (impl->status == Closed) + *error_code = hr = E_ILLEGAL_METHOD_CALL; + else + *error_code = impl->hr; + + return hr; } static HRESULT WINAPI async_void_info_Cancel( IAsyncInfo *iface ) { + struct async_void *impl = impl_from_async_void_IAsyncInfo(iface); + HRESULT hr = S_OK; + TRACE("iface %p.\n", iface); - return E_NOTIMPL; + + if (impl->status == Closed) + hr = E_ILLEGAL_METHOD_CALL; + else if (impl->status == Started) + impl->status = Canceled; + + return hr; } static HRESULT WINAPI async_void_info_Close( IAsyncInfo *iface ) { + struct async_void *impl = impl_from_async_void_IAsyncInfo(iface); + HRESULT hr = S_OK; + TRACE("iface %p.\n", iface); - return E_NOTIMPL; + + if (impl->status == Started) + hr = E_ILLEGAL_STATE_CHANGE; + else if (impl->status != Closed) + impl->status = Closed; + + return hr; } static const struct IAsyncInfoVtbl async_void_info_vtbl = @@ -210,6 +286,9 @@ HRESULT async_action_create( IAsyncAction **out ) impl->IAsyncInfo_iface.lpVtbl = &async_void_info_vtbl; impl->ref = 1; + impl->handler = HANDLER_NOT_SET; + impl->status = Completed; + *out = &impl->IAsyncAction_iface; TRACE("created %p\n", *out); return S_OK; diff --git a/dlls/windows.media.speech/tests/speech.c b/dlls/windows.media.speech/tests/speech.c index f3b28c40f51..5e74b90bf9a 100644 --- a/dlls/windows.media.speech/tests/speech.c +++ b/dlls/windows.media.speech/tests/speech.c @@ -1581,27 +1581,25 @@ static void test_Recognition(void) handler = (void *)0xdeadbeef; hr = IAsyncAction_get_Completed(action, &handler); - todo_wine ok(hr == S_OK, "IAsyncAction_put_Completed failed, hr %#lx.\n", hr); - todo_wine ok(handler == NULL, "Handler was %p.\n", handler); - - if (FAILED(hr)) goto skip_action; + ok(hr == S_OK, "IAsyncAction_put_Completed failed, hr %#lx.\n", hr); + ok(handler == NULL, "Handler was %p.\n", handler); await_async_void(action, &action_handler); hr = IAsyncAction_QueryInterface(action, &IID_IAsyncInfo, (void **)&info); - todo_wine ok(hr == S_OK, "IAsyncAction_QueryInterface failed, hr %#lx.\n", hr); + ok(hr == S_OK, "IAsyncAction_QueryInterface failed, hr %#lx.\n", hr); check_async_info((IInspectable *)action, 1, Completed, S_OK); hr = IAsyncInfo_Cancel(info); - todo_wine ok(hr == S_OK, "IAsyncInfo_Cancel failed, hr %#lx.\n", hr); + ok(hr == S_OK, "IAsyncInfo_Cancel failed, hr %#lx.\n", hr); check_async_info((IInspectable *)action, 1, Completed, S_OK); hr = IAsyncInfo_Close(info); - todo_wine ok(hr == S_OK, "IAsyncInfo_Close failed, hr %#lx.\n", hr); + ok(hr == S_OK, "IAsyncInfo_Close failed, hr %#lx.\n", hr); check_async_info((IInspectable *)action, 1, AsyncStatus_Closed, S_OK); hr = IAsyncInfo_Close(info); - todo_wine ok(hr == S_OK, "IAsyncInfo_Close failed, hr %#lx.\n", hr); + ok(hr == S_OK, "IAsyncInfo_Close failed, hr %#lx.\n", hr); check_async_info((IInspectable *)action, 1, AsyncStatus_Closed, S_OK); hr = IAsyncInfo_Cancel(info); @@ -1617,6 +1615,8 @@ static void test_Recognition(void) hr = ISpeechContinuousRecognitionSession_StopAsync(session, &action2); todo_wine ok(hr == S_OK, "ISpeechContinuousRecognitionSession_StopAsync failed, hr %#lx.\n", hr); + if (FAILED(hr)) goto skip_action; + async_void_handler_create_static(&action_handler); action_handler.event_block = CreateEventW(NULL, FALSE, FALSE, NULL); action_handler.event_finished = CreateEventW(NULL, FALSE, FALSE, NULL);
1
0
0
0
Bernhard Kölbl : windows.media.speech: Add IAsyncInfo to IAsyncAction.
by Alexandre Julliard
24 May '22
24 May '22
Module: wine Branch: master Commit: a01fa46146842bb53830073731a8747ddda15476 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a01fa46146842bb538300737…
Author: Bernhard Kölbl <besentv(a)gmail.com> Date: Tue May 3 13:37:10 2022 +0200 windows.media.speech: Add IAsyncInfo to IAsyncAction. Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com> --- dlls/windows.media.speech/async.c | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/dlls/windows.media.speech/async.c b/dlls/windows.media.speech/async.c index 1abb88528ef..d7ac090be78 100644 --- a/dlls/windows.media.speech/async.c +++ b/dlls/windows.media.speech/async.c @@ -35,6 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(speech); struct async_void { IAsyncAction IAsyncAction_iface; + IAsyncInfo IAsyncInfo_iface; LONG ref; }; @@ -58,6 +59,12 @@ HRESULT WINAPI async_void_QueryInterface( IAsyncAction *iface, REFIID iid, void return S_OK; } + if (IsEqualGUID(iid, &IID_IAsyncInfo)) + { + IInspectable_AddRef((*out = &impl->IAsyncInfo_iface)); + return S_OK; + } + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); *out = NULL; return E_NOINTERFACE; @@ -131,6 +138,61 @@ static const struct IAsyncActionVtbl async_void_vtbl = async_void_GetResults }; +/* + * + * IAsyncInfo for IAsyncAction + * + */ + +DEFINE_IINSPECTABLE_(async_void_info, IAsyncInfo, struct async_void, impl_from_async_void_IAsyncInfo, IAsyncInfo_iface, &impl->IAsyncAction_iface) + +static HRESULT WINAPI async_void_info_get_Id( IAsyncInfo *iface, UINT32 *id ) +{ + FIXME("iface %p, id %p stub!\n", iface, id); + return E_NOTIMPL; +} + +static HRESULT WINAPI async_void_info_get_Status( IAsyncInfo *iface, AsyncStatus *status ) +{ + FIXME("iface %p, status %p.\n", iface, status); + return E_NOTIMPL; +} + +static HRESULT WINAPI async_void_info_get_ErrorCode( IAsyncInfo *iface, HRESULT *error_code ) +{ + FIXME("iface %p, error_code %p.\n", iface, error_code); + return E_NOTIMPL; +} + +static HRESULT WINAPI async_void_info_Cancel( IAsyncInfo *iface ) +{ + TRACE("iface %p.\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI async_void_info_Close( IAsyncInfo *iface ) +{ + TRACE("iface %p.\n", iface); + return E_NOTIMPL; +} + +static const struct IAsyncInfoVtbl async_void_info_vtbl = +{ + /* IUnknown methods */ + async_void_info_QueryInterface, + async_void_info_AddRef, + async_void_info_Release, + /* IInspectable methods */ + async_void_info_GetIids, + async_void_info_GetRuntimeClassName, + async_void_info_GetTrustLevel, + /* IAsyncInfo */ + async_void_info_get_Id, + async_void_info_get_Status, + async_void_info_get_ErrorCode, + async_void_info_Cancel, + async_void_info_Close +}; HRESULT async_action_create( IAsyncAction **out ) { @@ -145,6 +207,7 @@ HRESULT async_action_create( IAsyncAction **out ) } impl->IAsyncAction_iface.lpVtbl = &async_void_vtbl; + impl->IAsyncInfo_iface.lpVtbl = &async_void_info_vtbl; impl->ref = 1; *out = &impl->IAsyncAction_iface;
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
91
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
Results per page:
10
25
50
100
200