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 2021
----- 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
1163 discussions
Start a n
N
ew thread
Michael Stefaniuc : uninstaller: Constify the string paramenter of output_array().
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 566321269d260caf3e0b302d0931903271bab3bb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=566321269d260caf3e0b302d…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Mar 17 22:30:50 2021 +0100 uninstaller: Constify the string paramenter of output_array(). Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/uninstaller/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/uninstaller/main.c b/programs/uninstaller/main.c index d7f308c798d..7686c803b36 100644 --- a/programs/uninstaller/main.c +++ b/programs/uninstaller/main.c @@ -110,7 +110,7 @@ static void WINAPIV output_message(unsigned int id, ...) __ms_va_end(va_args); } -static void WINAPIV output_array(WCHAR *fmt, ...) +static void WINAPIV output_array(const WCHAR *fmt, ...) { __ms_va_list va_args;
1
0
0
0
Andrew Eikum : winegstreamer: Set specific large buffer sizes for decodebin.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 9152bdcef30934450e525a4aab11c93d508ccd59 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9152bdcef30934450e525a4a…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Thu Mar 18 10:50:55 2021 -0500 winegstreamer: Set specific large buffer sizes for decodebin. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/wg_parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index aefb097f7f0..e0eff9ee309 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -546,9 +546,9 @@ static void CDECL wg_parser_complete_read_request(struct wg_parser *parser, bool static void CDECL wg_parser_set_unlimited_buffering(struct wg_parser *parser) { - g_object_set(parser->decodebin, "max-size-buffers", 0, NULL); - g_object_set(parser->decodebin, "max-size-time", G_GUINT64_CONSTANT(0), NULL); - g_object_set(parser->decodebin, "max-size-bytes", 0, NULL); + g_object_set(parser->decodebin, "max-size-buffers", G_MAXUINT, NULL); + g_object_set(parser->decodebin, "max-size-time", G_MAXUINT64, NULL); + g_object_set(parser->decodebin, "max-size-bytes", G_MAXUINT, NULL); } static void CDECL wg_parser_stream_get_preferred_format(struct wg_parser_stream *stream, struct wg_format *format)
1
0
0
0
Piotr Caban : user32: Add clipping region tests on window resize.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 4bb337fb635fc16edf08b513d283a746185795d1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4bb337fb635fc16edf08b513…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 18 16:06:47 2021 +0100 user32: Add clipping region tests on window resize. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/dce.c | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/dlls/user32/tests/dce.c b/dlls/user32/tests/dce.c index b76f8fac45b..861150f9a88 100644 --- a/dlls/user32/tests/dce.c +++ b/dlls/user32/tests/dce.c @@ -384,7 +384,7 @@ static void test_dc_visrgn(void) static void test_begin_paint(void) { HDC old_hdc, hdc; - RECT rect, parent_rect; + RECT rect, parent_rect, client_rect; PAINTSTRUCT ps; COLORREF cr; @@ -401,6 +401,33 @@ static void test_begin_paint(void) "invalid clip box %s\n", wine_dbgstr_rect( &rect )); EndPaint( hwnd_cache, &ps ); + SetWindowPos( hwnd_cache, 0, 0, 0, 100, 100, SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE ); + RedrawWindow( hwnd_cache, NULL, 0, RDW_VALIDATE|RDW_NOFRAME|RDW_NOERASE ); + SetRect( &rect, 0, 0, 150, 150 ); + RedrawWindow( hwnd_cache, &rect, 0, RDW_INVALIDATE|RDW_NOFRAME|RDW_NOERASE ); + hdc = BeginPaint( hwnd_cache, &ps ); + GetClipBox( hdc, &rect ); + GetClientRect( hwnd_cache, &client_rect ); + ok( EqualRect( &rect, &client_rect ), "clip box = %s, expected %s\n", + wine_dbgstr_rect( &rect ), wine_dbgstr_rect( &client_rect )); + SetWindowPos( hwnd_cache, 0, 0, 0, 200, 200, SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE ); + GetClipBox( hdc, &rect ); + GetClientRect( hwnd_cache, &client_rect ); + todo_wine ok( (!rect.left && !rect.top && rect.right == 150 && rect.bottom == 150) || + broken( EqualRect( &rect, &client_rect )), + "clip box = %s\n", wine_dbgstr_rect( &rect )); + EndPaint( hwnd_cache, &ps ); + + SetWindowPos( hwnd_cache, 0, 0, 0, 100, 100, SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE ); + RedrawWindow( hwnd_cache, NULL, 0, RDW_INVALIDATE|RDW_NOFRAME|RDW_NOERASE ); + hdc = BeginPaint( hwnd_cache, &ps ); + SetWindowPos( hwnd_cache, 0, 0, 0, 200, 200, SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE ); + GetClipBox( hdc, &rect ); + GetClientRect( hwnd_cache, &client_rect ); + todo_wine ok( EqualRect( &rect, &client_rect ), "clip box = %s, expected %s\n", + wine_dbgstr_rect( &rect ), wine_dbgstr_rect( &client_rect )); + EndPaint( hwnd_cache, &ps ); + /* window DC */ RedrawWindow( hwnd_owndc, NULL, 0, RDW_VALIDATE|RDW_NOFRAME|RDW_NOERASE ); @@ -440,6 +467,21 @@ static void test_begin_paint(void) ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20), "clip box should still be the whole window %s\n", wine_dbgstr_rect( &rect )); + SetWindowPos( hwnd_owndc, 0, 0, 0, 100, 100, SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE ); + RedrawWindow( hwnd_owndc, NULL, 0, RDW_VALIDATE|RDW_NOFRAME|RDW_NOERASE ); + SetRect( &rect, 0, 0, 50, 50 ); + RedrawWindow( hwnd_owndc, &rect, 0, RDW_INVALIDATE|RDW_ERASE ); + hdc = BeginPaint( hwnd_owndc, &ps ); + GetClipBox( hdc, &rect ); + ok( !rect.left && !rect.top && rect.right == 50 && rect.bottom == 50, + "clip box = %s\n", wine_dbgstr_rect( &rect )); + SetWindowPos( hwnd_owndc, 0, 0, 0, 200, 200, SWP_NOZORDER|SWP_NOMOVE|SWP_NOACTIVATE ); + GetClipBox( hdc, &rect ); + GetClientRect( hwnd_owndc, &client_rect ); + ok( EqualRect( &rect, &client_rect ), "clip box = %s, expected %s\n", + wine_dbgstr_rect( &rect ), wine_dbgstr_rect( &client_rect )); + EndPaint( hwnd_owndc, &ps ); + /* class DC */ RedrawWindow( hwnd_classdc, NULL, 0, RDW_VALIDATE|RDW_NOFRAME|RDW_NOERASE );
1
0
0
0
Rémi Bernon : windows.gaming.input: Implement IGamepadStatics::Gamepads stubs.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 4a4d5a6f3d6f1f28560215fe306078fc073c12d9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4a4d5a6f3d6f1f28560215fe…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 18 09:58:46 2021 +0100 windows.gaming.input: Implement IGamepadStatics::Gamepads stubs. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.gaming.input/main.c | 126 +++++++++++++++++++++++++++++++- dlls/windows.gaming.input/tests/input.c | 6 +- 2 files changed, 126 insertions(+), 6 deletions(-) diff --git a/dlls/windows.gaming.input/main.c b/dlls/windows.gaming.input/main.c index 50d73a1adf4..5e349d98fab 100644 --- a/dlls/windows.gaming.input/main.c +++ b/dlls/windows.gaming.input/main.c @@ -46,6 +46,126 @@ static const char *debugstr_hstring(HSTRING hstr) return wine_dbgstr_wn(str, len); } +struct gamepad_vector +{ + IVectorView_Gamepad IVectorView_Gamepad_iface; + LONG ref; +}; + +static inline struct gamepad_vector *impl_from_IVectorView_Gamepad(IVectorView_Gamepad *iface) +{ + return CONTAINING_RECORD(iface, struct gamepad_vector, IVectorView_Gamepad_iface); +} + +static HRESULT STDMETHODCALLTYPE vector_view_gamepad_QueryInterface( + IVectorView_Gamepad *iface, REFIID iid, void **out) +{ + TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out); + + if (IsEqualGUID(iid, &IID_IUnknown) || + IsEqualGUID(iid, &IID_IInspectable) || + IsEqualGUID(iid, &IID_IAgileObject) || + IsEqualGUID(iid, &IID_IVectorView_Gamepad)) + { + IUnknown_AddRef(iface); + *out = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE vector_view_gamepad_AddRef( + IVectorView_Gamepad *iface) +{ + struct gamepad_vector *impl = impl_from_IVectorView_Gamepad(iface); + ULONG ref = InterlockedIncrement(&impl->ref); + TRACE("iface %p, ref %u.\n", iface, ref); + return ref; +} + +static ULONG STDMETHODCALLTYPE vector_view_gamepad_Release( + IVectorView_Gamepad *iface) +{ + struct gamepad_vector *impl = impl_from_IVectorView_Gamepad(iface); + ULONG ref = InterlockedDecrement(&impl->ref); + TRACE("iface %p, ref %u.\n", iface, ref); + return ref; +} + +static HRESULT STDMETHODCALLTYPE vector_view_gamepad_GetIids( + IVectorView_Gamepad *iface, ULONG *iid_count, IID **iids) +{ + FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE vector_view_gamepad_GetRuntimeClassName( + IVectorView_Gamepad *iface, HSTRING *class_name) +{ + FIXME("iface %p, class_name %p stub!\n", iface, class_name); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE vector_view_gamepad_GetTrustLevel( + IVectorView_Gamepad *iface, TrustLevel *trust_level) +{ + FIXME("iface %p, trust_level %p stub!\n", iface, trust_level); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE vector_view_gamepad_GetAt( + IVectorView_Gamepad *iface, ULONG index, IGamepad **value) +{ + FIXME("iface %p, index %#x, value %p stub!\n", iface, index, value); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE vector_view_gamepad_get_Size( + IVectorView_Gamepad *iface, ULONG *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE vector_view_gamepad_IndexOf( + IVectorView_Gamepad *iface, IGamepad *element, ULONG *index, BOOLEAN *value) +{ + FIXME("iface %p, element %p, index %p, value %p stub!\n", iface, element, index, value); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE vector_view_gamepad_GetMany( + IVectorView_Gamepad *iface, ULONG start_index, IGamepad **items, UINT *value) +{ + FIXME("iface %p, start_index %#x, items %p, value %p stub!\n", iface, start_index, items, value); + return E_NOTIMPL; +} + +static const struct IVectorView_GamepadVtbl vector_view_gamepad_vtbl = +{ + vector_view_gamepad_QueryInterface, + vector_view_gamepad_AddRef, + vector_view_gamepad_Release, + /* IInspectable methods */ + vector_view_gamepad_GetIids, + vector_view_gamepad_GetRuntimeClassName, + vector_view_gamepad_GetTrustLevel, + /* IVectorView<VoiceInformation> methods */ + vector_view_gamepad_GetAt, + vector_view_gamepad_get_Size, + vector_view_gamepad_IndexOf, + vector_view_gamepad_GetMany, +}; + +static struct gamepad_vector gamepads = +{ + {&vector_view_gamepad_vtbl}, + 0 +}; + struct windows_gaming_input { IActivationFactory IActivationFactory_iface; @@ -224,8 +344,10 @@ static HRESULT STDMETHODCALLTYPE gamepad_statics_remove_GamepadRemoved( static HRESULT STDMETHODCALLTYPE gamepad_statics_get_Gamepads( IGamepadStatics *iface, IVectorView_Gamepad **value) { - FIXME("iface %p, value %p stub!\n", iface, value); - return E_NOTIMPL; + TRACE("iface %p, value %p.\n", iface, value); + *value = &gamepads.IVectorView_Gamepad_iface; + IVectorView_Gamepad_AddRef(*value); + return S_OK; } static const struct IGamepadStaticsVtbl gamepad_statics_vtbl = diff --git a/dlls/windows.gaming.input/tests/input.c b/dlls/windows.gaming.input/tests/input.c index 2d2b76255d0..cfd814d5631 100644 --- a/dlls/windows.gaming.input/tests/input.c +++ b/dlls/windows.gaming.input/tests/input.c @@ -151,8 +151,7 @@ static void test_Gamepad(void) IAgileObject_Release(tmp_agile_object); hr = IGamepadStatics_get_Gamepads(gamepad_statics, &gamepads); - todo_wine ok(hr == S_OK, "IGamepadStatics_get_Gamepads failed, hr %#x\n", hr); - if (FAILED(hr)) goto done; + ok(hr == S_OK, "IGamepadStatics_get_Gamepads failed, hr %#x\n", hr); hr = IVectorView_Gamepad_QueryInterface(gamepads, &IID_IInspectable, (void **)&tmp_inspectable); ok(hr == S_OK, "IVectorView_Gamepad_QueryInterface failed, hr %#x\n", hr); @@ -166,12 +165,11 @@ static void test_Gamepad(void) size = 0xdeadbeef; hr = IVectorView_Gamepad_get_Size(gamepads, &size); - ok(hr == S_OK, "IVectorView_Gamepad_get_Size failed, hr %#x\n", hr); + todo_wine ok(hr == S_OK, "IVectorView_Gamepad_get_Size failed, hr %#x\n", hr); todo_wine ok(size != 0xdeadbeef, "IVectorView_Gamepad_get_Size returned %u\n", size); IVectorView_Gamepad_Release(gamepads); -done: token.value = 0xdeadbeef; hr = IGamepadStatics_add_GamepadAdded(gamepad_statics, &gamepad_event_handler.IEventHandler_Gamepad_iface, &token); todo_wine ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr);
1
0
0
0
Rémi Bernon : windows.gaming.input: Implement IGamepadStatics stubs.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 800bbece7824f8fe4778964331db13477e2dcac4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=800bbece7824f8fe47789643…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 18 09:58:45 2021 +0100 windows.gaming.input: Implement IGamepadStatics stubs. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.gaming.input/main.c | 113 ++++++++++++++++++++++++++++++++ dlls/windows.gaming.input/tests/input.c | 8 +-- 2 files changed, 117 insertions(+), 4 deletions(-) diff --git a/dlls/windows.gaming.input/main.c b/dlls/windows.gaming.input/main.c index 05ef844893b..50d73a1adf4 100644 --- a/dlls/windows.gaming.input/main.c +++ b/dlls/windows.gaming.input/main.c @@ -29,7 +29,10 @@ #include "initguid.h" #include "activation.h" +#define WIDL_using_Windows_Foundation +#define WIDL_using_Windows_Foundation_Collections #include "windows.foundation.h" +#define WIDL_using_Windows_Gaming_Input #include "windows.gaming.input.h" WINE_DEFAULT_DEBUG_CHANNEL(input); @@ -46,6 +49,7 @@ static const char *debugstr_hstring(HSTRING hstr) struct windows_gaming_input { IActivationFactory IActivationFactory_iface; + IGamepadStatics IGamepadStatics_iface; LONG ref; }; @@ -54,9 +58,16 @@ static inline struct windows_gaming_input *impl_from_IActivationFactory(IActivat return CONTAINING_RECORD(iface, struct windows_gaming_input, IActivationFactory_iface); } +static inline struct windows_gaming_input *impl_from_IGamepadStatics(IGamepadStatics *iface) +{ + return CONTAINING_RECORD(iface, struct windows_gaming_input, IGamepadStatics_iface); +} + static HRESULT STDMETHODCALLTYPE windows_gaming_input_QueryInterface( IActivationFactory *iface, REFIID iid, void **out) { + struct windows_gaming_input *impl = impl_from_IActivationFactory(iface); + TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out); if (IsEqualGUID(iid, &IID_IUnknown) || @@ -69,6 +80,13 @@ static HRESULT STDMETHODCALLTYPE windows_gaming_input_QueryInterface( return S_OK; } + if (IsEqualGUID(iid, &IID_IGamepadStatics)) + { + IUnknown_AddRef(iface); + *out = &impl->IGamepadStatics_iface; + return S_OK; + } + FIXME("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); *out = NULL; return E_NOINTERFACE; @@ -133,9 +151,104 @@ static const struct IActivationFactoryVtbl activation_factory_vtbl = windows_gaming_input_ActivateInstance, }; +static HRESULT STDMETHODCALLTYPE gamepad_statics_QueryInterface( + IGamepadStatics *iface, REFIID iid, void **out) +{ + struct windows_gaming_input *impl = impl_from_IGamepadStatics(iface); + return windows_gaming_input_QueryInterface(&impl->IActivationFactory_iface, iid, out); +} + +static ULONG STDMETHODCALLTYPE gamepad_statics_AddRef( + IGamepadStatics *iface) +{ + struct windows_gaming_input *impl = impl_from_IGamepadStatics(iface); + return windows_gaming_input_AddRef(&impl->IActivationFactory_iface); +} + +static ULONG STDMETHODCALLTYPE gamepad_statics_Release( + IGamepadStatics *iface) +{ + struct windows_gaming_input *impl = impl_from_IGamepadStatics(iface); + return windows_gaming_input_Release(&impl->IActivationFactory_iface); +} + +static HRESULT STDMETHODCALLTYPE gamepad_statics_GetIids( + IGamepadStatics *iface, ULONG *iid_count, IID **iids) +{ + FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE gamepad_statics_GetRuntimeClassName( + IGamepadStatics *iface, HSTRING *class_name) +{ + FIXME("iface %p, class_name %p stub!\n", iface, class_name); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE gamepad_statics_GetTrustLevel( + IGamepadStatics *iface, TrustLevel *trust_level) +{ + FIXME("iface %p, trust_level %p stub!\n", iface, trust_level); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE gamepad_statics_add_GamepadAdded( + IGamepadStatics *iface, IEventHandler_Gamepad *value, EventRegistrationToken* token) +{ + FIXME("iface %p, value %p, token %p stub!\n", iface, value, token); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE gamepad_statics_remove_GamepadAdded( + IGamepadStatics *iface, EventRegistrationToken token) +{ + FIXME("iface %p, token %#I64x stub!\n", iface, token.value); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE gamepad_statics_add_GamepadRemoved( + IGamepadStatics *iface, IEventHandler_Gamepad *value, EventRegistrationToken* token) +{ + FIXME("iface %p, value %p, token %p stub!\n", iface, value, token); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE gamepad_statics_remove_GamepadRemoved( + IGamepadStatics *iface, EventRegistrationToken token) +{ + FIXME("iface %p, token %#I64x stub!\n", iface, token.value); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE gamepad_statics_get_Gamepads( + IGamepadStatics *iface, IVectorView_Gamepad **value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + return E_NOTIMPL; +} + +static const struct IGamepadStaticsVtbl gamepad_statics_vtbl = +{ + gamepad_statics_QueryInterface, + gamepad_statics_AddRef, + gamepad_statics_Release, + /* IInspectable methods */ + gamepad_statics_GetIids, + gamepad_statics_GetRuntimeClassName, + gamepad_statics_GetTrustLevel, + /* IGamepadStatics methods */ + gamepad_statics_add_GamepadAdded, + gamepad_statics_remove_GamepadAdded, + gamepad_statics_add_GamepadRemoved, + gamepad_statics_remove_GamepadRemoved, + gamepad_statics_get_Gamepads, +}; + static struct windows_gaming_input windows_gaming_input = { {&activation_factory_vtbl}, + {&gamepad_statics_vtbl}, 1 }; diff --git a/dlls/windows.gaming.input/tests/input.c b/dlls/windows.gaming.input/tests/input.c index fa437dade6e..2d2b76255d0 100644 --- a/dlls/windows.gaming.input/tests/input.c +++ b/dlls/windows.gaming.input/tests/input.c @@ -138,8 +138,7 @@ static void test_Gamepad(void) ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#x\n", hr); hr = IActivationFactory_QueryInterface(factory, &IID_IGamepadStatics, (void **)&gamepad_statics); - todo_wine ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IGamepadStatics failed, hr %#x\n", hr); - if (FAILED(hr)) goto done; + ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IGamepadStatics failed, hr %#x\n", hr); hr = IGamepadStatics_QueryInterface(gamepad_statics, &IID_IInspectable, (void **)&tmp_inspectable); ok(hr == S_OK, "IGamepadStatics_QueryInterface IID_IInspectable failed, hr %#x\n", hr); @@ -152,7 +151,8 @@ static void test_Gamepad(void) IAgileObject_Release(tmp_agile_object); hr = IGamepadStatics_get_Gamepads(gamepad_statics, &gamepads); - ok(hr == S_OK, "IGamepadStatics_get_Gamepads failed, hr %#x\n", hr); + todo_wine ok(hr == S_OK, "IGamepadStatics_get_Gamepads failed, hr %#x\n", hr); + if (FAILED(hr)) goto done; hr = IVectorView_Gamepad_QueryInterface(gamepads, &IID_IInspectable, (void **)&tmp_inspectable); ok(hr == S_OK, "IVectorView_Gamepad_QueryInterface failed, hr %#x\n", hr); @@ -171,6 +171,7 @@ static void test_Gamepad(void) IVectorView_Gamepad_Release(gamepads); +done: token.value = 0xdeadbeef; hr = IGamepadStatics_add_GamepadAdded(gamepad_statics, &gamepad_event_handler.IEventHandler_Gamepad_iface, &token); todo_wine ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr); @@ -189,7 +190,6 @@ static void test_Gamepad(void) IGamepadStatics_Release(gamepad_statics); -done: IAgileObject_Release(agile_object); IInspectable_Release(inspectable); IActivationFactory_Release(factory);
1
0
0
0
Rémi Bernon : windows.gaming.input: Add stub dll.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 5604d34439aa805fb11a5a6ba70ad87a31f93afa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5604d34439aa805fb11a5a6b…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 18 09:58:44 2021 +0100 windows.gaming.input: Add stub dll. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 3 + configure.ac | 2 + dlls/windows.gaming.input/Makefile.in | 9 + dlls/windows.gaming.input/classes.idl | 23 +++ dlls/windows.gaming.input/main.c | 159 ++++++++++++++ dlls/windows.gaming.input/tests/Makefile.in | 5 + dlls/windows.gaming.input/tests/input.c | 228 +++++++++++++++++++++ .../windows.gaming.input/windows.gaming.input.spec | 3 + 8 files changed, 432 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=5604d34439aa805fb11a…
1
0
0
0
Rémi Bernon : windows.media.speech: Cleanup test to better check results and ignore refcounts.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: de62ca8ab909985d794b985ee9343a13301fb87f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=de62ca8ab909985d794b985e…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 18 09:58:43 2021 +0100 windows.media.speech: Cleanup test to better check results and ignore refcounts. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.media.speech/tests/Makefile.in | 2 +- .../tests/{statics.c => speech.c} | 52 +++++++++------------- 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/dlls/windows.media.speech/tests/Makefile.in b/dlls/windows.media.speech/tests/Makefile.in index fad32174647..f3e458f53d1 100644 --- a/dlls/windows.media.speech/tests/Makefile.in +++ b/dlls/windows.media.speech/tests/Makefile.in @@ -2,4 +2,4 @@ TESTDLL = windows.media.speech.dll IMPORTS = uuid C_SRCS = \ - statics.c + speech.c diff --git a/dlls/windows.media.speech/tests/statics.c b/dlls/windows.media.speech/tests/speech.c similarity index 71% rename from dlls/windows.media.speech/tests/statics.c rename to dlls/windows.media.speech/tests/speech.c index 9faa49dfc5d..33ce75c0c0e 100644 --- a/dlls/windows.media.speech/tests/statics.c +++ b/dlls/windows.media.speech/tests/speech.c @@ -52,69 +52,59 @@ static void test_SpeechSynthesizer(void) IAgileObject *agile_object = NULL, *tmp_agile_object = NULL; HSTRING str; HRESULT hr; - ULONG rc, size; + ULONG size; hr = pRoInitialize(RO_INIT_MULTITHREADED); - ok(SUCCEEDED(hr), "RoInitialize failed, hr %#x\n", hr); + ok(hr == S_OK, "RoInitialize failed, hr %#x\n", hr); hr = pWindowsCreateString(speech_synthesizer_name, wcslen(speech_synthesizer_name), &str); - ok(SUCCEEDED(hr), "WindowsCreateString failed, hr %#x\n", hr); + ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr); hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); - ok(SUCCEEDED(hr), "RoGetActivationFactory failed, hr %#x\n", hr); - - rc = IActivationFactory_AddRef(factory); - ok(rc == 3, "IActivationFactory_AddRef returned %d\n", rc); - rc = IActivationFactory_Release(factory); - ok(rc == 2, "IActivationFactory_Release returned %d\n", rc); + ok(hr == S_OK, "RoGetActivationFactory failed, hr %#x\n", hr); hr = IActivationFactory_QueryInterface(factory, &IID_IInspectable, (void **)&inspectable); - ok(SUCCEEDED(hr), "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#x\n", hr); + ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#x\n", hr); hr = IActivationFactory_QueryInterface(factory, &IID_IAgileObject, (void **)&agile_object); - ok(SUCCEEDED(hr), "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#x\n", hr); + ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#x\n", hr); hr = IActivationFactory_QueryInterface(factory, &IID_IInstalledVoicesStatic, (void **)&voices_static); - ok(SUCCEEDED(hr), "IActivationFactory_QueryInterface IID_IInstalledVoicesStatic failed, hr %#x\n", hr); + ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInstalledVoicesStatic failed, hr %#x\n", hr); hr = IInstalledVoicesStatic_QueryInterface(voices_static, &IID_IInspectable, (void **)&tmp_inspectable); - ok(SUCCEEDED(hr), "IInstalledVoicesStatic_QueryInterface IID_IInspectable failed, hr %#x\n", hr); + ok(hr == S_OK, "IInstalledVoicesStatic_QueryInterface IID_IInspectable failed, hr %#x\n", hr); ok(tmp_inspectable == inspectable, "IInstalledVoicesStatic_QueryInterface IID_IInspectable returned %p, expected %p\n", tmp_inspectable, inspectable); IInspectable_Release(tmp_inspectable); hr = IInstalledVoicesStatic_QueryInterface(voices_static, &IID_IAgileObject, (void **)&tmp_agile_object); - ok(SUCCEEDED(hr), "IInstalledVoicesStatic_QueryInterface IID_IAgileObject failed, hr %#x\n", hr); + ok(hr == S_OK, "IInstalledVoicesStatic_QueryInterface IID_IAgileObject failed, hr %#x\n", hr); ok(tmp_agile_object == agile_object, "IInstalledVoicesStatic_QueryInterface IID_IAgileObject returned %p, expected %p\n", tmp_agile_object, agile_object); IAgileObject_Release(tmp_agile_object); hr = IInstalledVoicesStatic_get_AllVoices(voices_static, &voices); - ok(SUCCEEDED(hr), "IInstalledVoicesStatic_get_AllVoices failed, hr %#x\n", hr); + ok(hr == S_OK, "IInstalledVoicesStatic_get_AllVoices failed, hr %#x\n", hr); hr = IVectorView_VoiceInformation_QueryInterface(voices, &IID_IInspectable, (void **)&tmp_inspectable); - ok(SUCCEEDED(hr), "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); + ok(hr == S_OK, "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); ok(tmp_inspectable != inspectable, "IVectorView_VoiceInformation_QueryInterface voices returned %p, expected %p\n", tmp_inspectable, inspectable); IInspectable_Release(tmp_inspectable); hr = IVectorView_VoiceInformation_QueryInterface(voices, &IID_IAgileObject, (void **)&tmp_agile_object); - ok(FAILED(hr), "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); + ok(hr == E_NOINTERFACE, "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); size = 0xdeadbeef; hr = IVectorView_VoiceInformation_get_Size(voices, &size); - ok(SUCCEEDED(hr), "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); + ok(hr == S_OK, "IVectorView_VoiceInformation_get_Size voices failed, hr %#x\n", hr); todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_VoiceInformation_get_Size returned %u\n", size); - rc = IVectorView_VoiceInformation_Release(voices); - ok(rc == 0, "IVectorView_VoiceInformation_Release returned unexpected refcount %d\n", rc); + IVectorView_VoiceInformation_Release(voices); - rc = IInstalledVoicesStatic_Release(voices_static); - ok(rc == 4, "IInstalledVoicesStatic_Release returned unexpected refcount %d\n", rc); + IInstalledVoicesStatic_Release(voices_static); - rc = IAgileObject_Release(agile_object); - ok(rc == 3, "IAgileObject_Release returned unexpected refcount %d\n", rc); - rc = IInspectable_Release(inspectable); - ok(rc == 2, "IInspectable_Release returned unexpected refcount %d\n", rc); - rc = IActivationFactory_Release(factory); - ok(rc == 1, "IActivationFactory_Release returned unexpected refcount %d\n", rc); + IAgileObject_Release(agile_object); + IInspectable_Release(inspectable); + IActivationFactory_Release(factory); pWindowsDeleteString(str); @@ -130,10 +120,10 @@ static void test_VoiceInformation(void) HRESULT hr; hr = pRoInitialize(RO_INIT_MULTITHREADED); - ok(SUCCEEDED(hr), "RoInitialize failed, hr %#x\n", hr); + ok(hr == S_OK, "RoInitialize failed, hr %#x\n", hr); hr = pWindowsCreateString(voice_information_name, wcslen(voice_information_name), &str); - ok(SUCCEEDED(hr), "WindowsCreateString failed, hr %#x\n", hr); + ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr); hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); ok(hr == REGDB_E_CLASSNOTREG, "RoGetActivationFactory returned unexpected hr %#x\n", hr); @@ -143,7 +133,7 @@ static void test_VoiceInformation(void) pRoUninitialize(); } -START_TEST(statics) +START_TEST(speech) { HMODULE combase;
1
0
0
0
David White : urlmon: Implement IMoniker_ComposeWith() for url monikers.
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 67e7f6cd566c6fdc9d5503ec46cedeab02ebc925 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=67e7f6cd566c6fdc9d5503ec…
Author: David White <dwhite(a)codeweavers.com> Date: Wed Mar 17 17:29:14 2021 -0500 urlmon: Implement IMoniker_ComposeWith() for url monikers. Signed-off-by: David White <dwhite(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/urlmon/tests/url.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/urlmon/umon.c | 25 ++++++++--- 2 files changed, 132 insertions(+), 5 deletions(-) diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c index ab92cbdd56e..88f660d2d54 100644 --- a/dlls/urlmon/tests/url.c +++ b/dlls/urlmon/tests/url.c @@ -40,6 +40,7 @@ static HRESULT (WINAPI *pCreateAsyncBindCtxEx)(IBindCtx *, DWORD, IBindStatusCallback *, IEnumFORMATETC *, IBindCtx **, DWORD); static HRESULT (WINAPI *pCreateUri)(LPCWSTR, DWORD, DWORD_PTR, IUri**); +DEFINE_OLEGUID(CLSID_CompositeMoniker, 0x309, 0, 0 ); DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); DEFINE_GUID(CLSID_IdentityUnmarshal,0x0000001b,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); DEFINE_GUID(IID_IBindStatusCallbackHolder,0x79eac9cc,0xbaf9,0x11ce,0x8c,0x82,0x00,0xaa,0x00,0x4b,0xa9,0x0b); @@ -2896,6 +2897,114 @@ static void init_bind_test(int protocol, DWORD flags, DWORD t) if (winetest_debug > 1) trace("URL: %s\n", wine_dbgstr_w(current_url)); } +static void test_MonikerComposeWith(void) +{ + static const struct test_data + { + const WCHAR *l, *r, *expected; + } data[] = + { + {L"
https://test.winehq.org/
", L"/tests/hello.html", L"
https://test.winehq.org/tests/hello.html
"}, + {L"url1", L"url2", L"url2"}, + {L"http://", L"
tests.winehq.org
", L"http:///tests.winehq.org"}, + {L"
http://a/b/c/d;p?q#f
", L"g", L"
http://a/b/c/g
"}, + {L"
http://a/b/c/d;p?q#f
", L"./g", L"
http://a/b/c/g
"}, + {L"
http://a/b/c/d;p?q#f
", L"g/", L"
http://a/b/c/g/
"}, + {L"
http://a/b/c/d;p?q#f
", L"/g", L"
http://a/g
"}, + {L"
http://a/b/c/d;p?q#f
", L"//g", L"
http://g/
"}, + {L"
http://a/b/c/d;p?q#f
", L"?y", L"
http://a/b/c/d;p?y
"}, + {L"
http://a/b/c/d;p?q#f
", L"g?y", L"
http://a/b/c/g?y
"}, + {L"
http://a/b/c/d;p?q#f
", L"g?y/./x", L"
http://a/b/c/g?y/./x
"}, + {L"
http://a/b/c/d;p?q#f
", L"#s", L"
http://a/b/c/d;p?q#s
"}, + {L"
http://a/b/c/d;p?q#f
", L"g#s", L"
http://a/b/c/g#s
"}, + {L"
http://a/b/c/d;p?q#f
", L"g#s/./x", L"
http://a/b/c/g#s/./x
"}, + {L"
http://a/b/c/d;p?q#f
", L"g?y#s", L"
http://a/b/c/g?y#s
"}, + {L"
http://a/b/c/d;p?q#f
", L";x", L"
http://a/b/c/;x
"}, + {L"
http://a/b/c/d;p?q#f
", L"g;x", L"
http://a/b/c/g;x
"}, + {L"
http://a/b/c/d;p?q#f
", L"g;x?y#s", L"
http://a/b/c/g;x?y#s
"}, + {L"
http://a/b/c/d;p?q#f
", L".", L"
http://a/b/c/
"}, + {L"
http://a/b/c/d;p?q#f
", L"./", L"
http://a/b/c/
"}, + {L"
http://a/b/c/d;p?q#f
", L"..", L"
http://a/b/
"}, + {L"
http://a/b/c/d;p?q#f
", L"../", L"
http://a/b/
"}, + {L"
http://a/b/c/d;p?q#f
", L"../g", L"
http://a/b/g
"}, + {L"
http://a/b/c/d;p?q#f
", L"../..", L"
http://a/
"}, + {L"
http://a/b/c/d;p?q#f
", L"../../", L"
http://a/
"}, + {L"
http://a/b/c/d;p?q#f
", L"../../g", L"
http://a/g
"}, + {L"
http://a/b/c/d;p?q#f
", L"../../../g", L"
http://a/g
"}, + {L"
http://a/b/c/d;p?q#f
", L"../../../../g", L"
http://a/g
"}, + {L"
http://a/b/c/d;p?q#f
", L"/./g", L"
http://a/g
"}, + {L"
http://a/b/c/d;p?q#f
", L"/../g", L"
http://a/g
"}, + {L"
http://a/b/c/d;p?q#f
", L"g.", L"
http://a/b/c/g
."}, + {L"
http://a/b/c/d;p?q#f
", L".g", L"
http://a/b/c/.g
"}, + {L"
http://a/b/c/d;p?q#f
", L"g..", L"
http://a/b/c/g
.."}, + {L"
http://a/b/c/d;p?q#f
", L"..g", L"
http://a/b/c/..g
"}, + {L"
http://a/b/c/d;p?q#f
", L"./../g", L"
http://a/b/g
"}, + {L"
http://a/b/c/d;p?q#f
", L"./g/.", L"
http://a/b/c/g/
"}, + {L"
http://a/b/c/d;p?q#f
", L"g/./h", L"
http://a/b/c/g/h
"}, + {L"
http://a/b/c/d;p?q#f
", L"g/../h", L"
http://a/b/c/h
"}, + {L"file://a/b/c/d;p?q#f", L"http:g", L"http:g"}, + {L"
http://a/b/c/d;p?q#f
", L"
http://g/h
", L"
http://g/h
"}, + }; + IMoniker *lmon, *rmon, *outmon, *filemon; + HRESULT hres; + LPOLESTR urlpath; + CLSID clsid; + int i; + IBindCtx* bind; + + CreateBindCtx(0, &bind); + for(i = 0; i < ARRAY_SIZE( data ); i++){ + hres = CreateURLMoniker(NULL, data[i].l, &lmon); + ok(hres == S_OK, "failed to create moniker: %08x\n", hres); + hres = CreateURLMoniker(NULL, data[i].r, &rmon); + ok(hres == S_OK, "failed to create moniker: %08x\n", hres); + + hres = IMoniker_ComposeWith(lmon, rmon, FALSE, &outmon); + ok(hres == S_OK, + "ComposeWith failed: l: %s, r: %s, ret: %08x\n", wine_dbgstr_w(data[i].l), wine_dbgstr_w(data[i].r), hres); + + IMoniker_GetClassID(outmon, &clsid); + ok(IsEqualCLSID(&clsid, &CLSID_StdURLMoniker), + "ComposeWith error: expected URL CLSID, got %s\n", wine_dbgstr_guid(&clsid)); + IMoniker_GetDisplayName(outmon, bind, NULL, &urlpath); + ok(lstrcmpW(data[i].expected, urlpath) == S_OK, + "ComposeWith expected %s got %s\n", wine_dbgstr_w(data[i].expected), wine_dbgstr_w(urlpath)); + + IMoniker_Release(lmon); + IMoniker_Release(rmon); + IMoniker_Release(outmon); + CoTaskMemFree(urlpath); + } + IBindCtx_Release(bind); + + hres = CreateURLMoniker(NULL, data[0].l, &lmon); + ok(hres == S_OK, "failed to create moniker: %08x\n", hres); + hres = CreateURLMoniker(NULL, data[0].r, &rmon); + ok(hres == S_OK, "failed to create moniker: %08x\n", hres); + hres = CreateFileMoniker(L"/a/b", &filemon); + ok(hres == S_OK, "failed to create moniker: %08x\n", hres); + + hres = IMoniker_ComposeWith(lmon, NULL, FALSE, &outmon); + ok(hres == E_INVALIDARG, "ComposeWith error: %08x\n", hres); + + hres = IMoniker_ComposeWith(lmon, rmon, FALSE, NULL); + ok(hres == E_INVALIDARG, "ComposeWith error: %08x\n", hres); + + hres = IMoniker_ComposeWith(lmon, filemon, TRUE, &outmon); + ok(hres == MK_E_NEEDGENERIC, "ComposeWith error: %08x\n", hres); + hres = IMoniker_ComposeWith(lmon, filemon, FALSE, &outmon); + ok(hres == S_OK, "ComposeWith error: %08x\n", hres); + + IMoniker_GetClassID(outmon, &clsid); + ok(IsEqualCLSID(&clsid, &CLSID_CompositeMoniker), + "ComposeWith: got CLSID %s, not generic\n", wine_dbgstr_guid(&clsid)); + + IMoniker_Release(lmon); + IMoniker_Release(rmon); + IMoniker_Release(filemon); + IMoniker_Release(outmon); +} + static void test_BindToStorage(int protocol, DWORD flags, DWORD t) { IMoniker *mon; @@ -3931,6 +4040,9 @@ START_TEST(url) trace("test StdURLMoniker...\n"); test_StdURLMoniker(); + trace("test URLMonikerComposeWith...\n"); + test_MonikerComposeWith(); + trace("synchronous http test...\n"); test_BindToStorage(HTTP_TEST, 0, TYMED_ISTREAM); diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c index e51b2f07d26..7959468ecd7 100644 --- a/dlls/urlmon/umon.c +++ b/dlls/urlmon/umon.c @@ -295,12 +295,27 @@ static HRESULT WINAPI URLMoniker_Reduce(IMoniker *iface, IBindCtx *pbc, return MK_S_REDUCED_TO_SELF; } -static HRESULT WINAPI URLMoniker_ComposeWith(IMoniker *iface, IMoniker *pmkRight, - BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite) +static HRESULT WINAPI URLMoniker_ComposeWith(IMoniker *iface, IMoniker *right, + BOOL only_if_not_generic, IMoniker **composite) { - URLMoniker *This = impl_from_IMoniker(iface); - FIXME("(%p)->(%p,%d,%p): stub\n",This,pmkRight,fOnlyIfNotGeneric,ppmkComposite); - return E_NOTIMPL; + HRESULT res; + IUri *right_uri; + IUriContainer *uri_container; + + TRACE("(%p)->(%p,%d,%p)\n", iface, right, only_if_not_generic, composite); + + if (!right || !composite) return E_INVALIDARG; + + res = IMoniker_QueryInterface(right, &IID_IUriContainer, (void**)&uri_container); + if (SUCCEEDED(res)){ + res = IUriContainer_GetIUri(uri_container, &right_uri); + if (SUCCEEDED(res)) res = CreateURLMonikerEx2(iface, right_uri, composite, 0); + IUriContainer_Release(uri_container); + return res; + } + + if(only_if_not_generic) return MK_E_NEEDGENERIC; + return CreateGenericComposite(iface, right, composite); } static HRESULT WINAPI URLMoniker_Enum(IMoniker *iface, BOOL fForward, IEnumMoniker **ppenumMoniker)
1
0
0
0
Zebediah Figura : d3d11: Use wined3d_device_context_set_rendertarget_view().
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 973902038da0b5a0da290122b6b29dff0cb2b0ba URL:
https://source.winehq.org/git/wine.git/?a=commit;h=973902038da0b5a0da290122…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Mar 17 19:45:18 2021 -0500 d3d11: Use wined3d_device_context_set_rendertarget_view(). 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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 0ceae50ce4c..cab5ebefcc2 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -934,6 +934,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetRenderTargets(ID3D11D UINT render_target_view_count, ID3D11RenderTargetView *const *render_target_views, ID3D11DepthStencilView *depth_stencil_view) { + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); struct d3d_depthstencil_view *dsv; unsigned int i; @@ -945,11 +946,12 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetRenderTargets(ID3D11D for (i = 0; i < render_target_view_count; ++i) { struct d3d_rendertarget_view *rtv = unsafe_impl_from_ID3D11RenderTargetView(render_target_views[i]); - wined3d_device_set_rendertarget_view(device->wined3d_device, i, rtv ? rtv->wined3d_view : NULL, FALSE); + wined3d_device_context_set_rendertarget_view(context->wined3d_context, i, + rtv ? rtv->wined3d_view : NULL, FALSE); } for (; i < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i) { - wined3d_device_set_rendertarget_view(device->wined3d_device, i, NULL, FALSE); + wined3d_device_context_set_rendertarget_view(context->wined3d_context, i, NULL, FALSE); } dsv = unsafe_impl_from_ID3D11DepthStencilView(depth_stencil_view); @@ -2619,7 +2621,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceCon wined3d_device_set_primitive_type(device->wined3d_device, WINED3D_PT_UNDEFINED, 0); for (i = 0; i < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; ++i) { - wined3d_device_set_rendertarget_view(device->wined3d_device, i, NULL, FALSE); + wined3d_device_context_set_rendertarget_view(context->wined3d_context, i, NULL, FALSE); } wined3d_device_set_depth_stencil_view(device->wined3d_device, NULL); for (i = 0; i < WINED3D_PIPELINE_COUNT; ++i)
1
0
0
0
Zebediah Figura : wined3d: Introduce wined3d_device_context_set_rendertarget_view().
by Alexandre Julliard
18 Mar '21
18 Mar '21
Module: wine Branch: master Commit: 507bd1ae169f6304810baabc190a25c12ad33896 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=507bd1ae169f6304810baabc…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Mar 17 19:45:17 2021 -0500 wined3d: Introduce wined3d_device_context_set_rendertarget_view(). 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 | 171 ++++++++++++++++++++++++---------------------- dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 2 + 3 files changed, 93 insertions(+), 81 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 382e72055a4..e7b57a34595 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2284,6 +2284,94 @@ void CDECL wined3d_device_context_set_unordered_access_view(struct wined3d_devic wined3d_unordered_access_view_decref(prev); } +static void wined3d_device_context_unbind_srv_for_rtv(struct wined3d_device_context *context, + const struct wined3d_rendertarget_view *view, BOOL dsv) +{ + struct wined3d_state *state = context->state; + + if (view && wined3d_is_rtv_srv_bound(view)) + { + const struct wined3d_resource *resource = view->resource; + const struct wined3d_shader_resource_view *srv; + unsigned int i, j; + + WARN("Application sets bound resource as render target.\n"); + + for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i) + for (j = 0; j < MAX_SHADER_RESOURCE_VIEWS; ++j) + if ((srv = state->shader_resource_view[i][j]) && srv->resource == resource + && ((!dsv && wined3d_is_srv_rtv_bound(srv)) + || (dsv && wined3d_dsv_srv_conflict(view, srv->format)))) + wined3d_device_context_set_shader_resource_view(context, i, j, NULL); + } +} + +HRESULT CDECL wined3d_device_context_set_rendertarget_view(struct wined3d_device_context *context, + unsigned int view_idx, struct wined3d_rendertarget_view *view, BOOL set_viewport) +{ + struct wined3d_state *state = context->state; + struct wined3d_rendertarget_view *prev; + unsigned int max_rt_count; + + TRACE("context %p, view_idx %u, view %p, set_viewport %#x.\n", + context, view_idx, view, set_viewport); + + max_rt_count = context->device->adapter->d3d_info.limits.max_rt_count; + if (view_idx >= max_rt_count) + { + WARN("Only %u render targets are supported.\n", max_rt_count); + return WINED3DERR_INVALIDCALL; + } + + if (view && !(view->resource->bind_flags & WINED3D_BIND_RENDER_TARGET)) + { + WARN("View resource %p doesn't have render target bind flags.\n", view->resource); + return WINED3DERR_INVALIDCALL; + } + + /* Set the viewport and scissor rectangles, if requested. Tests show that + * stateblock recording is ignored, the change goes directly into the + * primary stateblock. */ + if (!view_idx && set_viewport) + { + state->viewports[0].x = 0; + state->viewports[0].y = 0; + state->viewports[0].width = view->width; + state->viewports[0].height = view->height; + state->viewports[0].min_z = 0.0f; + state->viewports[0].max_z = 1.0f; + state->viewport_count = 1; + wined3d_device_context_emit_set_viewports(context, 1, state->viewports); + + SetRect(&state->scissor_rects[0], 0, 0, view->width, view->height); + state->scissor_rect_count = 1; + wined3d_device_context_emit_set_scissor_rects(context, 1, state->scissor_rects); + } + + prev = state->fb.render_targets[view_idx]; + if (view == prev) + return WINED3D_OK; + + if (view) + { + wined3d_rendertarget_view_incref(view); + wined3d_rtv_bind_count_inc(view); + } + state->fb.render_targets[view_idx] = view; + wined3d_device_context_emit_set_rendertarget_view(context, view_idx, view); + /* Release after the assignment, to prevent device_resource_released() + * from seeing the surface as still in use. */ + if (prev) + { + wined3d_rtv_bind_count_dec(prev); + wined3d_rendertarget_view_decref(prev); + } + + wined3d_device_context_unbind_srv_for_rtv(context, view, FALSE); + + return WINED3D_OK; +} + void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader) { TRACE("device %p, shader %p.\n", device, shader); @@ -5172,92 +5260,13 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_depth_stencil_view(c return device->cs->c.state->fb.depth_stencil; } -static void wined3d_unbind_srv_for_rtv(struct wined3d_device *device, - const struct wined3d_rendertarget_view *view, BOOL dsv) -{ - struct wined3d_state *state = device->cs->c.state; - - if (view && wined3d_is_rtv_srv_bound(view)) - { - const struct wined3d_resource *resource = view->resource; - const struct wined3d_shader_resource_view *srv; - unsigned int i, j; - - WARN("Application sets bound resource as render target.\n"); - - for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i) - for (j = 0; j < MAX_SHADER_RESOURCE_VIEWS; ++j) - if ((srv = state->shader_resource_view[i][j]) && srv->resource == resource - && ((!dsv && wined3d_is_srv_rtv_bound(srv)) - || (dsv && wined3d_dsv_srv_conflict(view, srv->format)))) - wined3d_device_context_set_shader_resource_view(&device->cs->c, i, j, NULL); - } -} - HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device, unsigned int view_idx, struct wined3d_rendertarget_view *view, BOOL set_viewport) { - struct wined3d_state *state = device->cs->c.state; - struct wined3d_rendertarget_view *prev; - unsigned int max_rt_count; - TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n", device, view_idx, view, set_viewport); - max_rt_count = device->adapter->d3d_info.limits.max_rt_count; - if (view_idx >= max_rt_count) - { - WARN("Only %u render targets are supported.\n", max_rt_count); - return WINED3DERR_INVALIDCALL; - } - - if (view && !(view->resource->bind_flags & WINED3D_BIND_RENDER_TARGET)) - { - WARN("View resource %p doesn't have render target bind flags.\n", view->resource); - return WINED3DERR_INVALIDCALL; - } - - /* Set the viewport and scissor rectangles, if requested. Tests show that - * stateblock recording is ignored, the change goes directly into the - * primary stateblock. */ - if (!view_idx && set_viewport) - { - state->viewports[0].x = 0; - state->viewports[0].y = 0; - state->viewports[0].width = view->width; - state->viewports[0].height = view->height; - state->viewports[0].min_z = 0.0f; - state->viewports[0].max_z = 1.0f; - state->viewport_count = 1; - wined3d_device_context_emit_set_viewports(&device->cs->c, 1, state->viewports); - - SetRect(&state->scissor_rects[0], 0, 0, view->width, view->height); - state->scissor_rect_count = 1; - wined3d_device_context_emit_set_scissor_rects(&device->cs->c, 1, state->scissor_rects); - } - - prev = state->fb.render_targets[view_idx]; - if (view == prev) - return WINED3D_OK; - - if (view) - { - wined3d_rendertarget_view_incref(view); - wined3d_rtv_bind_count_inc(view); - } - state->fb.render_targets[view_idx] = view; - wined3d_device_context_emit_set_rendertarget_view(&device->cs->c, view_idx, view); - /* Release after the assignment, to prevent device_resource_released() - * from seeing the surface as still in use. */ - if (prev) - { - wined3d_rtv_bind_count_dec(prev); - wined3d_rendertarget_view_decref(prev); - } - - wined3d_unbind_srv_for_rtv(device, view, FALSE); - - return WINED3D_OK; + return wined3d_device_context_set_rendertarget_view(&device->cs->c, view_idx, view, set_viewport); } HRESULT CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, @@ -5287,7 +5296,7 @@ HRESULT CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *devic wined3d_cs_emit_set_depth_stencil_view(device->cs, view); if (prev) wined3d_rendertarget_view_decref(prev); - wined3d_unbind_srv_for_rtv(device, view, TRUE); + wined3d_device_context_unbind_srv_for_rtv(&device->cs->c, view, TRUE); return WINED3D_OK; } diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 9655c1a65f2..ad66cef0f9c 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -170,6 +170,7 @@ @ cdecl wined3d_device_context_set_constant_buffer(ptr long long ptr) @ cdecl wined3d_device_context_set_depth_stencil_state(ptr ptr long) @ cdecl wined3d_device_context_set_rasterizer_state(ptr ptr) +@ cdecl wined3d_device_context_set_rendertarget_view(ptr long ptr long) @ cdecl wined3d_device_context_set_sampler(ptr long long ptr) @ cdecl wined3d_device_context_set_scissor_rects(ptr long ptr) @ cdecl wined3d_device_context_set_shader(ptr long ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 38b4d8d792d..e066e688125 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2563,6 +2563,8 @@ void __cdecl wined3d_device_context_set_depth_stencil_state(struct wined3d_devic struct wined3d_depth_stencil_state *depth_stencil_state, unsigned int stencil_ref); void __cdecl wined3d_device_context_set_rasterizer_state(struct wined3d_device_context *context, struct wined3d_rasterizer_state *rasterizer_state); +HRESULT __cdecl wined3d_device_context_set_rendertarget_view(struct wined3d_device_context *context, + unsigned int view_idx, struct wined3d_rendertarget_view *view, BOOL set_viewport); void __cdecl wined3d_device_context_set_sampler(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int idx, struct wined3d_sampler *sampler); void __cdecl wined3d_device_context_set_scissor_rects(struct wined3d_device_context *context, unsigned int rect_count,
1
0
0
0
← Newer
1
...
50
51
52
53
54
55
56
...
117
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
111
112
113
114
115
116
117
Results per page:
10
25
50
100
200