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
October 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
614 discussions
Start a n
N
ew thread
Zhiyi Zhang : gdi32: Add D3DKMTSetVidPnSourceOwner and D3DKMTCheckVidPnExclusiveOwnership stubs.
by Alexandre Julliard
22 Oct '19
22 Oct '19
Module: wine Branch: master Commit: 354359197bd568e89ffd2e4f229f3839b23a5f2a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=354359197bd568e89ffd2e4f…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue Oct 22 16:38:56 2019 +0800 gdi32: Add D3DKMTSetVidPnSourceOwner and D3DKMTCheckVidPnExclusiveOwnership stubs. D3DKMTSetVidPnSourceOwner needs to be implemented in the graphics drivers because we need to maintain the VidPN source ownership information list in the graphics drivers. For example, the graphics drivers need to release the exclusive ownership when a new window is moved to a monitor which has been taken exclusive ownership. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-dx-d3dkmt-l1-1-0.spec | 4 +- dlls/d3d11/d3d11.spec | 3 +- dlls/gdi32/dibdrv/dc.c | 4 ++ dlls/gdi32/driver.c | 52 ++++++++++++++++++++++ dlls/gdi32/enhmfdrv/dc.c | 2 + dlls/gdi32/enhmfdrv/init.c | 2 + dlls/gdi32/freetype.c | 2 + dlls/gdi32/gdi32.spec | 2 + dlls/gdi32/mfdrv/init.c | 2 + dlls/gdi32/path.c | 2 + dlls/wineandroid.drv/init.c | 2 + dlls/winemac.drv/gdi.c | 2 + dlls/wineps.drv/init.c | 2 + dlls/winex11.drv/init.c | 2 + dlls/winex11.drv/xrender.c | 2 + include/ddk/d3dkmthk.h | 2 + include/ddraw.h | 2 + include/wine/gdi_driver.h | 6 ++- 18 files changed, 91 insertions(+), 4 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=354359197bd568e89ffd…
1
0
0
0
Zhiyi Zhang : gdi32: Support multiple monitors in D3DKMTOpenAdapterFromGdiDisplayName.
by Alexandre Julliard
22 Oct '19
22 Oct '19
Module: wine Branch: master Commit: 95c66d690f05b4680d50dd4c0bb7d5f50dcaea40 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=95c66d690f05b4680d50dd4c…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue Oct 22 16:38:46 2019 +0800 gdi32: Support multiple monitors in D3DKMTOpenAdapterFromGdiDisplayName. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/driver.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index fc0839f51d..eaf1cf7788 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -55,7 +55,6 @@ struct graphics_driver struct d3dkmt_adapter { D3DKMT_HANDLE handle; /* Kernel mode graphics adapter handle */ - INT ordinal; /* Graphics adapter ordinal */ struct list entry; /* List entry */ }; @@ -1339,21 +1338,20 @@ NTSTATUS WINAPI D3DKMTCloseAdapter( const D3DKMT_CLOSEADAPTER *desc ) */ NTSTATUS WINAPI D3DKMTOpenAdapterFromGdiDisplayName( D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME *desc ) { - static const WCHAR display1W[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0}; + static const WCHAR displayW[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y'}; static D3DKMT_HANDLE handle_start = 0; struct d3dkmt_adapter *adapter; + WCHAR *end; + int id; TRACE("(%p) semi-stub\n", desc); - if (!desc) + if (!desc || strncmpiW( desc->DeviceName, displayW, ARRAY_SIZE(displayW) )) return STATUS_UNSUCCESSFUL; - /* FIXME: Support multiple monitors */ - if (lstrcmpiW( desc->DeviceName, display1W )) - { - FIXME("%s is unsupported\n", wine_dbgstr_w( desc->DeviceName )); + id = strtolW( desc->DeviceName + ARRAY_SIZE(displayW), &end, 10 ) - 1; + if (*end) return STATUS_UNSUCCESSFUL; - } adapter = heap_alloc( sizeof( *adapter ) ); if (!adapter) @@ -1362,7 +1360,6 @@ NTSTATUS WINAPI D3DKMTOpenAdapterFromGdiDisplayName( D3DKMT_OPENADAPTERFROMGDIDI EnterCriticalSection( &driver_section ); /* D3DKMT_HANDLE is UINT, so we can't use pointer as handle */ adapter->handle = ++handle_start; - adapter->ordinal = 0; list_add_tail( &d3dkmt_adapters, &adapter->entry ); LeaveCriticalSection( &driver_section ); @@ -1370,7 +1367,7 @@ NTSTATUS WINAPI D3DKMTOpenAdapterFromGdiDisplayName( D3DKMT_OPENADAPTERFROMGDIDI /* FIXME: Support AdapterLuid */ desc->AdapterLuid.LowPart = 0; desc->AdapterLuid.HighPart = 0; - desc->VidPnSourceId = 0; + desc->VidPnSourceId = id; return STATUS_SUCCESS; }
1
0
0
0
Michael Stefaniuc : comctl32/tests: Get rid of variables holding empty strings.
by Alexandre Julliard
22 Oct '19
22 Oct '19
Module: wine Branch: master Commit: f8979fee1fa2e6aeed5a5026465dffa680c0848f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f8979fee1fa2e6aeed5a5026…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Oct 22 01:24:32 2019 +0200 comctl32/tests: Get rid of variables holding empty strings. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/edit.c | 3 +-- dlls/comctl32/tests/pager.c | 24 +++++++++++------------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c index 111545d298..3fe208c321 100644 --- a/dlls/comctl32/tests/edit.c +++ b/dlls/comctl32/tests/edit.c @@ -3240,7 +3240,6 @@ static void test_cue_banner(void) static WCHAR getcuetestW[5] = {'T',0}; static const WCHAR testcmp1W[] = {'T','e','s','t',0}; static const WCHAR testcmp2W[] = {'T','e','s',0}; - static const WCHAR emptyW[] = {0}; hwnd_edit = create_editcontrolW(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); @@ -3279,7 +3278,7 @@ static void test_cue_banner(void) ok(ret == TRUE, "EM_GETCUEBANNER should have returned TRUE.\n"); ok(lstrcmpW(getcuetestW, testcmp1W) == 0, "EM_GETCUEBANNER returned string %s.\n", wine_dbgstr_w(getcuetestW)); - ret = SendMessageW(hwnd_edit, EM_SETCUEBANNER, 0, (LPARAM)emptyW); + ret = SendMessageW(hwnd_edit, EM_SETCUEBANNER, 0, (LPARAM)L""); ok(ret == TRUE, "EM_SETCUEBANNER should have returned TRUE.\n"); ret = SendMessageW(hwnd_edit, EM_GETCUEBANNER, (WPARAM)getcuetestW, 5); diff --git a/dlls/comctl32/tests/pager.c b/dlls/comctl32/tests/pager.c index 0e2c25b08a..30005c88fa 100644 --- a/dlls/comctl32/tests/pager.c +++ b/dlls/comctl32/tests/pager.c @@ -34,8 +34,6 @@ static const CHAR test_a[] = "test"; static const WCHAR test_w[] = L"test"; /* Double zero so that it's safe to cast it to WCHAR * */ static const CHAR te_a[] = {'t', 'e', 0, 0}; -static WCHAR empty_w[] = {0}; -static CHAR empty_a[] = {0}; static const CHAR large_a[] = "You should have received a copy of the GNU Lesser General Public License along with this ..."; static const WCHAR large_w[] = @@ -132,17 +130,17 @@ static const struct notify_test_send test_dont_convert_send_data[] = static const struct notify_test_receive test_convert_receive_data[] = { - {empty_w, sizeof(empty_w), ARRAY_SIZE(buffer), NULL, test_a, sizeof(test_a), -1, test_w, ARRAY_SIZE(buffer)}, - {empty_w, sizeof(empty_w), ARRAY_SIZE(buffer), test_a, NULL, 0, -1, test_w, ARRAY_SIZE(buffer)}, - {NULL, sizeof(empty_w), ARRAY_SIZE(buffer), test_a, NULL, 0, -1, NULL, ARRAY_SIZE(buffer)}, - {empty_w, sizeof(empty_w), ARRAY_SIZE(buffer), large_a, NULL, 0, -1, large_truncated_65_w, ARRAY_SIZE(buffer)}, - {empty_w, sizeof(empty_w), ARRAY_SIZE(buffer), empty_a, 0, 0, 1, empty_w, 1}, + {L"", sizeof(L""), ARRAY_SIZE(buffer), NULL, test_a, sizeof(test_a), -1, test_w, ARRAY_SIZE(buffer)}, + {L"", sizeof(L""), ARRAY_SIZE(buffer), test_a, NULL, 0, -1, test_w, ARRAY_SIZE(buffer)}, + {NULL, sizeof(L""), ARRAY_SIZE(buffer), test_a, NULL, 0, -1, NULL, ARRAY_SIZE(buffer)}, + {L"", sizeof(L""), ARRAY_SIZE(buffer), large_a, NULL, 0, -1, large_truncated_65_w, ARRAY_SIZE(buffer)}, + {L"", sizeof(L""), ARRAY_SIZE(buffer), "", 0, 0, 1, L"", 1}, }; static const struct notify_test_receive test_dont_convert_receive_data[] = { - {empty_w, sizeof(empty_w), ARRAY_SIZE(buffer), NULL, test_a, sizeof(test_a), -1, test_a, ARRAY_SIZE(buffer)}, - {empty_w, sizeof(empty_w), ARRAY_SIZE(buffer), test_a, NULL, 0, -1, test_a, ARRAY_SIZE(buffer)}, + {L"", sizeof(L""), ARRAY_SIZE(buffer), NULL, test_a, sizeof(test_a), -1, test_a, ARRAY_SIZE(buffer)}, + {L"", sizeof(L""), ARRAY_SIZE(buffer), test_a, NULL, 0, -1, test_a, ARRAY_SIZE(buffer)}, }; static const struct notify_test_tooltip @@ -165,15 +163,15 @@ static const struct notify_test_tooltip const WCHAR *send_lpsztext; } test_tooltip_data[] = { - {NULL, 0, NULL, NULL, empty_w, -1, empty_w}, + {NULL, 0, NULL, NULL, L"", -1, L""}, {test_a, sizeof(test_a), NULL, NULL, test_w, -1, test_w}, {test_a, sizeof(test_a), test_a, NULL, test_w, -1, test_w}, - {test_a, sizeof(test_a), (CHAR *)1, (HMODULE)0xdeadbeef, empty_w, -1, (WCHAR *)1, (HMODULE)0xdeadbeef}, + {test_a, sizeof(test_a), (CHAR *)1, (HMODULE)0xdeadbeef, L"", -1, (WCHAR *)1, (HMODULE)0xdeadbeef}, {test_a, sizeof(test_a), test_a, (HMODULE)0xdeadbeef, test_w, -1, test_w, (HMODULE)0xdeadbeef}, {NULL, 0, test_a, NULL, test_w, -1, test_w}, {test_a, 2, test_a, NULL, test_w, -1, test_w}, {NULL, 0, NULL, NULL, test_w, -1, test_w, NULL, test_a, test_w, sizeof(test_w)}, - {NULL, 0, NULL, NULL, empty_w, -1, empty_w, NULL, empty_a, NULL, 0, test_w}, + {NULL, 0, NULL, NULL, L"", -1, L"", NULL, "", NULL, 0, test_w}, {NULL, 0, large_a, NULL, large_truncated_80_w, sizeof(large_truncated_80_w), large_w} }; @@ -194,7 +192,7 @@ static const struct notify_test_datetime_format } test_datetime_format_data[] = { {test_w, test_a}, - {NULL, NULL, NULL, 0, test_a, empty_w, -1, test_w}, + {NULL, NULL, NULL, 0, test_a, L"", -1, test_w}, {NULL, NULL, test_a, sizeof(test_a), NULL, test_w, -1, test_w}, {NULL, NULL, test_a, 2, test_a, (WCHAR *)te_a, -1, test_w}, {NULL, NULL, NULL, 0, large_a, NULL, 0, large_w}
1
0
0
0
Michael Stefaniuc : comctl32/tests: Simplify comparison with empty string.
by Alexandre Julliard
22 Oct '19
22 Oct '19
Module: wine Branch: master Commit: 442b10da8051798cfd9fda8d11a3ae5364b6de5f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=442b10da8051798cfd9fda8d…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Oct 22 01:24:31 2019 +0200 comctl32/tests: Simplify comparison with empty string. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/edit.c | 6 +++--- dlls/comctl32/tests/pager.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c index 6013cafb59..111545d298 100644 --- a/dlls/comctl32/tests/edit.c +++ b/dlls/comctl32/tests/edit.c @@ -3245,13 +3245,13 @@ static void test_cue_banner(void) hwnd_edit = create_editcontrolW(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0); ret = SendMessageW(hwnd_edit, EM_GETCUEBANNER, (WPARAM)getcuetestW, 5); - if (lstrcmpW(getcuetestW, emptyW) != 0) + if (getcuetestW[0]) { win_skip("skipping for Win XP and 2003 Server.\n"); DestroyWindow(hwnd_edit); return; } - ok(lstrcmpW(getcuetestW, emptyW) == 0, "First char is %c\n", getcuetestW[0]); + ok(!getcuetestW[0], "First char is %c\n", getcuetestW[0]); ok(ret == FALSE, "EM_GETCUEBANNER should have returned FALSE.\n"); lstrcpyW(getcuetestW, testcmp1W); @@ -3284,7 +3284,7 @@ static void test_cue_banner(void) ret = SendMessageW(hwnd_edit, EM_GETCUEBANNER, (WPARAM)getcuetestW, 5); ok(ret == TRUE, "EM_GETCUEBANNER should have returned TRUE.\n"); - ok(lstrcmpW(getcuetestW, emptyW) == 0, "EM_GETCUEBANNER returned string %s.\n", wine_dbgstr_w(getcuetestW)); + ok(!getcuetestW[0], "EM_GETCUEBANNER returned string %s.\n", wine_dbgstr_w(getcuetestW)); /* EM_GETCUEBANNER's buffer size includes null char */ ret = SendMessageW(hwnd_edit, EM_SETCUEBANNER, 0, (LPARAM)testcmp1W); diff --git a/dlls/comctl32/tests/pager.c b/dlls/comctl32/tests/pager.c index 087e4452cc..0e2c25b08a 100644 --- a/dlls/comctl32/tests/pager.c +++ b/dlls/comctl32/tests/pager.c @@ -611,7 +611,7 @@ static void notify_generic_text_handler(CHAR **text, INT *text_max) send_data = (notify_test_info.test_id == CONVERT_SEND ? test_convert_send_data : test_dont_convert_send_data) + notify_test_info.sub_test_id; if (notify_test_info.flags & ZERO_SEND) - ok(!lstrcmpA(*text, empty_a), "Code 0x%08x test 0x%08x sub test %d expect empty text, got %s\n", + ok(!*text[0], "Code 0x%08x test 0x%08x sub test %d expect empty text, got %s\n", notify_test_info.unicode, notify_test_info.test_id, notify_test_info.sub_test_id, *text); else if (notify_test_info.flags & CONVERT_SEND) ok(!lstrcmpA(send_data->expect_text, *text), "Code 0x%08x test 0x%08x sub test %d expect %s, got %s\n", @@ -650,7 +650,7 @@ static void notify_generic_text_handler(CHAR **text, INT *text_max) break; } case SEND_EMPTY_IF_NULL: - ok(!lstrcmpA(*text, empty_a), "Code 0x%08x test 0x%08x sub test %d expect empty text, got %s\n", + ok(!*text[0], "Code 0x%08x test 0x%08x sub test %d expect empty text, got %s\n", notify_test_info.unicode, notify_test_info.test_id, notify_test_info.sub_test_id, *text); break; case DONT_SEND_EMPTY_IF_NULL:
1
0
0
0
Michael Stefaniuc : comctl32/tests: Constify some string holding variables / fields.
by Alexandre Julliard
22 Oct '19
22 Oct '19
Module: wine Branch: master Commit: 2f4717de34288f20493413b3c2c91e0fa2f55b56 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2f4717de34288f20493413b3…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Oct 22 01:24:30 2019 +0200 comctl32/tests: Constify some string holding variables / fields. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/pager.c | 83 +++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 48 deletions(-) diff --git a/dlls/comctl32/tests/pager.c b/dlls/comctl32/tests/pager.c index 4b5dfe6d96..087e4452cc 100644 --- a/dlls/comctl32/tests/pager.c +++ b/dlls/comctl32/tests/pager.c @@ -30,33 +30,20 @@ static HWND parent_wnd, child1_wnd, child2_wnd; static INT notify_format; static BOOL notify_query_received; -static WCHAR test_w[] = {'t', 'e', 's', 't', 0}; -static CHAR test_a[] = {'t', 'e', 's', 't', 0}; +static const CHAR test_a[] = "test"; +static const WCHAR test_w[] = L"test"; /* Double zero so that it's safe to cast it to WCHAR * */ -static CHAR te_a[] = {'t', 'e', 0, 0}; +static const CHAR te_a[] = {'t', 'e', 0, 0}; static WCHAR empty_w[] = {0}; static CHAR empty_a[] = {0}; -static CHAR large_a[] = "You should have received a copy of the GNU Lesser General Public License along with this ..."; -static WCHAR large_w[] = -{ - 'Y', 'o', 'u', ' ', 's', 'h', 'o', 'u', 'l', 'd', ' ', 'h', 'a', 'v', 'e', ' ', 'r', 'e', 'c', 'e', 'i', 'v', 'e', - 'd', ' ', 'a', ' ', 'c', 'o', 'p', 'y', ' ', 'o', 'f', ' ', 't', 'h', 'e', ' ', 'G', 'N', 'U', ' ', 'L', 'e', 's', - 's', 'e', 'r', ' ', 'G', 'e', 'n', 'e', 'r', 'a', 'l', ' ', 'P', 'u', 'b', 'l', 'i', 'c', ' ', 'L', 'i', 'c', 'e', - 'n', 's', 'e', ' ', 'a', 'l', 'o', 'n', 'g', ' ', 'w', 'i', 't', 'h', ' ', 't', 'h', 'i', 's', ' ', '.', '.', '.', 0 -}; -static WCHAR large_truncated_65_w[65] = -{ - 'Y', 'o', 'u', ' ', 's', 'h', 'o', 'u', 'l', 'd', ' ', 'h', 'a', 'v', 'e', ' ', 'r', 'e', 'c', 'e', 'i', 'v', - 'e', 'd', ' ', 'a', ' ', 'c', 'o', 'p', 'y', ' ', 'o', 'f', ' ', 't', 'h', 'e', ' ', 'G', 'N', 'U', ' ', 'L', - 'e', 's', 's', 'e', 'r', ' ', 'G', 'e', 'n', 'e', 'r', 'a', 'l', ' ', 'P', 'u', 'b', 'l', 'i', 'c', 0 -}; -static WCHAR large_truncated_80_w[80] = -{ - 'Y', 'o', 'u', ' ', 's', 'h', 'o', 'u', 'l', 'd', ' ', 'h', 'a', 'v', 'e', ' ', 'r', 'e', 'c', 'e', - 'i', 'v', 'e', 'd', ' ', 'a', ' ', 'c', 'o', 'p', 'y', ' ', 'o', 'f', ' ', 't', 'h', 'e', ' ', 'G', - 'N', 'U', ' ', 'L', 'e', 's', 's', 'e', 'r', ' ', 'G', 'e', 'n', 'e', 'r', 'a', 'l', ' ', 'P', 'u', - 'b', 'l', 'i', 'c', ' ', 'L', 'i', 'c', 'e', 'n', 's', 'e', ' ', 'a', 'l', 'o', 'n', 'g', ' ', 'w' -}; +static const CHAR large_a[] = + "You should have received a copy of the GNU Lesser General Public License along with this ..."; +static const WCHAR large_w[] = + L"You should have received a copy of the GNU Lesser General Public License along with this ..."; +static const WCHAR large_truncated_65_w[65] = + L"You should have received a copy of the GNU Lesser General Public"; +static const WCHAR large_truncated_80_w[80] = + L"You should have received a copy of the GNU Lesser General Public License along w"; static WCHAR buffer[64]; /* Text field conversion test behavior flags. */ @@ -96,26 +83,26 @@ static struct notify_test_info struct notify_test_send { /* Data sent to pager */ - WCHAR *send_text; + const WCHAR *send_text; INT send_text_size; INT send_text_max; /* Data expected by parent of pager */ - void *expect_text; + const void *expect_text; }; struct notify_test_receive { /* Data sent to pager */ - WCHAR *send_text; + const WCHAR *send_text; INT send_text_size; INT send_text_max; /* Data for parent to write */ - CHAR *write_pointer; - CHAR *write_text; + const CHAR *write_pointer; + const CHAR *write_text; INT write_text_size; INT write_text_max; /* Data when message returned */ - void *return_text; + const void *return_text; INT return_text_max; }; @@ -161,21 +148,21 @@ static const struct notify_test_receive test_dont_convert_receive_data[] = static const struct notify_test_tooltip { /* Data for parent to write */ - CHAR *write_sztext; + const CHAR *write_sztext; INT write_sztext_size; - CHAR *write_lpsztext; + const CHAR *write_lpsztext; HMODULE write_hinst; /* Data when message returned */ - WCHAR *return_sztext; + const WCHAR *return_sztext; INT return_sztext_size; - WCHAR *return_lpsztext; + const WCHAR *return_lpsztext; HMODULE return_hinst; /* Data expected by parent */ - CHAR *expect_sztext; + const CHAR *expect_sztext; /* Data send to parent */ - WCHAR *send_sztext; + const WCHAR *send_sztext; INT send_sztext_size; - WCHAR *send_lpsztext; + const WCHAR *send_lpsztext; } test_tooltip_data[] = { {NULL, 0, NULL, NULL, empty_w, -1, empty_w}, @@ -193,17 +180,17 @@ static const struct notify_test_tooltip static const struct notify_test_datetime_format { /* Data send to parent */ - WCHAR *send_pszformat; + const WCHAR *send_pszformat; /* Data expected by parent */ - CHAR *expect_pszformat; + const CHAR *expect_pszformat; /* Data for parent to write */ - CHAR *write_szdisplay; + const CHAR *write_szdisplay; INT write_szdisplay_size; - CHAR *write_pszdisplay; + const CHAR *write_pszdisplay; /* Data when message returned */ - WCHAR *return_szdisplay; + const WCHAR *return_szdisplay; INT return_szdisplay_size; - WCHAR *return_pszdisplay; + const WCHAR *return_pszdisplay; } test_datetime_format_data[] = { {test_w, test_a}, @@ -658,7 +645,7 @@ static void notify_generic_text_handler(CHAR **text, INT *text_max) else if(notify_test_info.unicode == HDN_GETDISPINFOW) *text = heap_strdup(receive_data->write_pointer); else - *text = receive_data->write_pointer; + *text = (char *)receive_data->write_pointer; if (text_max && receive_data->write_text_max != -1) *text_max = receive_data->write_text_max; break; } @@ -682,7 +669,7 @@ static void notify_tooltip_handler(NMTTDISPINFOA *nm) ok(!lstrcmpA(data->expect_sztext, nm->szText), "Sub test %d expect %s, got %s\n", notify_test_info.sub_test_id, data->expect_sztext, nm->szText); if (data->write_sztext) memcpy(nm->szText, data->write_sztext, data->write_sztext_size); - if (data->write_lpsztext) nm->lpszText = data->write_lpsztext; + if (data->write_lpsztext) nm->lpszText = (char *)data->write_lpsztext; if (data->write_hinst) nm->hinst = data->write_hinst; } @@ -1106,8 +1093,8 @@ static void test_wm_notify_header(HWND pager) HD_TEXTFILTERW hdtf = {0}; hdi.mask = HDI_TEXT | HDI_FILTER; - hdi.pszText = test_w; - hdtf.pszText = test_w; + hdi.pszText = (WCHAR *)test_w; + hdtf.pszText = (WCHAR *)test_w; nmh.pitem = &hdi; nmh.pitem->pvFilter = &hdtf; send_notify(pager, HDN_BEGINDRAG, HDN_BEGINDRAG, (LPARAM)&nmh, TRUE); @@ -1142,7 +1129,7 @@ static void test_wm_notify_tooltip(HWND pager) memset(&nmttdi, 0, sizeof(nmttdi)); if (data->send_sztext) memcpy(nmttdi.szText, data->send_sztext, data->send_sztext_size); - if (data->send_lpsztext) nmttdi.lpszText = data->send_lpsztext; + if (data->send_lpsztext) nmttdi.lpszText = (WCHAR *)data->send_lpsztext; send_notify(pager, TTN_GETDISPINFOW, TTN_GETDISPINFOA, (LPARAM)&nmttdi, FALSE); if (data->return_sztext) {
1
0
0
0
Alistair Leslie-Hughes : dinput: Detect more buttons as non-joysticks.
by Alexandre Julliard
22 Oct '19
22 Oct '19
Module: wine Branch: master Commit: 1dfc36c379c9c4b9dc346961af38042a8bc99ffb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1dfc36c379c9c4b9dc346961…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Oct 21 22:42:31 2019 +0000 dinput: Detect more buttons as non-joysticks. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/joystick_linux.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index e0c1331937..afdf659b4a 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -168,7 +168,7 @@ static INT find_joystick_devices(void) struct JoyDev joydev, *new_joydevs; BYTE axes_map[ABS_MAX + 1]; SHORT btn_map[KEY_MAX - BTN_MISC + 1]; - BOOL is_stylus = FALSE; + BOOL non_js = FALSE; snprintf(joydev.device, sizeof(joydev.device), "%s%d", JOYDEV_NEW, i); if ((fd = open(joydev.device, O_RDONLY)) == -1) @@ -242,8 +242,9 @@ static INT find_joystick_devices(void) case BTN_DEAD: joydev.is_joystick = TRUE; break; + case BTN_MOUSE: case BTN_STYLUS: - is_stylus = TRUE; + non_js = TRUE; break; default: break; @@ -251,9 +252,9 @@ static INT find_joystick_devices(void) } } - if(is_stylus) + if(non_js) { - TRACE("Stylus detected. Skipping\n"); + TRACE("Non-joystick detected. Skipping\n"); close(fd); continue; }
1
0
0
0
Zebediah Figura : quartz/filtergraph: Clarify stream time tracking.
by Alexandre Julliard
22 Oct '19
22 Oct '19
Module: wine Branch: master Commit: 524783dfeb27424591b2c6e775bf8acf06a414df URL:
https://source.winehq.org/git/wine.git/?a=commit;h=524783dfeb27424591b2c6e7…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Oct 21 16:54:51 2019 -0500 quartz/filtergraph: Clarify stream time tracking. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filtergraph.c | 46 ++++++++++++++++++++--------------------- dlls/quartz/tests/filtergraph.c | 4 ++-- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 9750e6fe84..d5442e21fc 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -202,8 +202,6 @@ typedef struct _IFilterGraphImpl { int nItfCacheEntries; BOOL defaultclock; GUID timeformatseek; - REFERENCE_TIME start_time; - REFERENCE_TIME pause_time; LONG recursioncount; IUnknown *pSite; LONG version; @@ -211,6 +209,10 @@ typedef struct _IFilterGraphImpl { HANDLE message_thread, message_thread_ret; DWORD message_thread_id; + /* Respectively: the last timestamp at which we started streaming, and the + * current offset within the stream. */ + REFERENCE_TIME stream_start, stream_elapsed; + LONGLONG current_pos; } IFilterGraphImpl; @@ -2519,16 +2521,14 @@ static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONG EnterCriticalSection(&graph->cs); - if (graph->state == State_Running && graph->refClock && graph->start_time >= 0) + if (graph->state == State_Running && graph->refClock) { REFERENCE_TIME time; IReferenceClock_GetTime(graph->refClock, &time); if (time) - ret += time - graph->start_time; + ret += time - graph->stream_start; } - if (graph->pause_time > 0) - ret += graph->pause_time; LeaveCriticalSection(&graph->cs); TRACE("Returning %s.\n", wine_dbgstr_longlong(ret)); @@ -2613,8 +2613,11 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * } } - if ((current_flags & 0x7) != AM_SEEKING_NoPositioning) - graph->pause_time = graph->start_time = -1; + if ((current_flags & 0x7) != AM_SEEKING_NoPositioning && graph->refClock) + { + IReferenceClock_GetTime(graph->refClock, &graph->stream_start); + graph->stream_elapsed = 0; + } if (state == State_Running) IMediaControl_Run(&graph->IMediaControl_iface); @@ -5232,13 +5235,13 @@ static HRESULT WINAPI MediaFilter_Pause(IMediaFilter *iface) if (graph->defaultclock && !graph->refClock) IFilterGraph2_SetDefaultSyncSource(&graph->IFilterGraph2_iface); - if (graph->state == State_Running && graph->refClock && graph->start_time >= 0) + if (graph->state == State_Running && graph->refClock) { - IReferenceClock_GetTime(graph->refClock, &graph->pause_time); - graph->current_pos += graph->pause_time - graph->start_time; + REFERENCE_TIME time; + IReferenceClock_GetTime(graph->refClock, &time); + graph->stream_elapsed += time - graph->stream_start; + graph->current_pos += graph->stream_elapsed; } - else - graph->pause_time = -1; SendFilterMessage(graph, SendPause, 0); graph->state = State_Paused; @@ -5250,6 +5253,7 @@ static HRESULT WINAPI MediaFilter_Pause(IMediaFilter *iface) static HRESULT WINAPI MediaFilter_Run(IMediaFilter *iface, REFERENCE_TIME start) { IFilterGraphImpl *graph = impl_from_IMediaFilter(iface); + REFERENCE_TIME stream_start = start; TRACE("graph %p, start %s.\n", graph, wine_dbgstr_longlong(start)); @@ -5267,19 +5271,13 @@ static HRESULT WINAPI MediaFilter_Run(IMediaFilter *iface, REFERENCE_TIME start) if (!start && graph->refClock) { - REFERENCE_TIME now; - IReferenceClock_GetTime(graph->refClock, &now); + IReferenceClock_GetTime(graph->refClock, &graph->stream_start); + stream_start = graph->stream_start - graph->stream_elapsed; if (graph->state == State_Stopped) - graph->start_time = now + 500000; - else if (graph->pause_time >= 0) - graph->start_time += now - graph->pause_time; - else - graph->start_time = now; + stream_start += 500000; } - else - graph->start_time = start; - SendFilterMessage(graph, SendRun, (DWORD_PTR)&graph->start_time); + SendFilterMessage(graph, SendRun, (DWORD_PTR)&stream_start); graph->state = State_Running; LeaveCriticalSection(&graph->cs); @@ -5726,7 +5724,7 @@ static HRESULT filter_graph_common_create(IUnknown *outer, void **out, BOOL thre fimpl->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IFilterGraphImpl.cs"); fimpl->nItfCacheEntries = 0; memcpy(&fimpl->timeformatseek, &TIME_FORMAT_MEDIA_TIME, sizeof(GUID)); - fimpl->start_time = fimpl->pause_time = 0; + fimpl->stream_start = fimpl->stream_elapsed = 0; fimpl->punkFilterMapper2 = NULL; fimpl->recursioncount = 0; fimpl->version = 0; diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 3ef610d76b..14f2dfaa7a 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -3947,12 +3947,12 @@ static void test_graph_seeking(void) hr = IMediaSeeking_GetCurrentPosition(seeking, &time); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(abs(time - 1334 * 10000) < 40 * 10000, + ok(abs(time - 1334 * 10000) < 40 * 10000, "Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(time)); current = stop = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(abs(current - 1334 * 10000) < 40 * 10000, + ok(abs(current - 1334 * 10000) < 40 * 10000, "Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(current)); ok(stop == 8000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
1
0
0
0
Zebediah Figura : quartz/filtergraph: Pause the graph even if AM_SEEKING_NoFlush is used.
by Alexandre Julliard
22 Oct '19
22 Oct '19
Module: wine Branch: master Commit: 13dbe644ce0789c79a682df0e4643ba56b01dd23 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=13dbe644ce0789c79a682df0…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Oct 21 16:54:50 2019 -0500 quartz/filtergraph: Pause the graph even if AM_SEEKING_NoFlush is used. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filtergraph.c | 4 ++-- dlls/quartz/tests/filtergraph.c | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 182ea5a2be..9750e6fe84 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -2583,7 +2583,7 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * EnterCriticalSection(&graph->cs); state = graph->state; - if (state == State_Running && !(current_flags & AM_SEEKING_NoFlush)) + if (state == State_Running) IMediaControl_Pause(&graph->IMediaControl_iface); LIST_FOR_EACH_ENTRY(filter, &graph->filters, struct filter, entry) @@ -2616,7 +2616,7 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * if ((current_flags & 0x7) != AM_SEEKING_NoPositioning) graph->pause_time = graph->start_time = -1; - if (state == State_Running && !(current_flags & AM_SEEKING_NoFlush)) + if (state == State_Running) IMediaControl_Run(&graph->IMediaControl_iface); LeaveCriticalSection(&graph->cs); diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 4b9b3b675c..3ef610d76b 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -3917,6 +3917,14 @@ static void test_graph_seeking(void) "Expected about 1234ms, got %s.\n", wine_dbgstr_longlong(current)); ok(stop == 9000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop)); + /* This remains true even if NoFlush is specified. */ + current = 1000 * 10000; + stop = 8000 * 10000; + hr = IMediaSeeking_SetPositions(seeking, ¤t, + AM_SEEKING_AbsolutePositioning | AM_SEEKING_NoFlush, + &stop, AM_SEEKING_AbsolutePositioning | AM_SEEKING_NoFlush); + ok(hr == S_OK, "Got hr %#x.\n", hr); + Sleep(100); hr = IMediaSeeking_GetCurrentPosition(seeking, &time); @@ -3928,7 +3936,7 @@ static void test_graph_seeking(void) ok(hr == S_OK, "Got hr %#x.\n", hr); ok(abs(current - 1334 * 10000) < 40 * 10000, "Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(current)); - ok(stop == 9000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop)); + ok(stop == 8000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop)); hr = IMediaControl_Pause(control); todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -3946,7 +3954,7 @@ static void test_graph_seeking(void) ok(hr == S_OK, "Got hr %#x.\n", hr); todo_wine ok(abs(current - 1334 * 10000) < 40 * 10000, "Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(current)); - ok(stop == 9000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop)); + ok(stop == 8000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop)); hr = IMediaControl_Stop(control); ok(hr == S_OK, "Got hr %#x.\n", hr);
1
0
0
0
Zebediah Figura : quartz/filtergraph: Set the current position in IMediaFilter::Stop().
by Alexandre Julliard
22 Oct '19
22 Oct '19
Module: wine Branch: master Commit: facbd0585c45bc44f4b8521cf3e3e1f3f20bb911 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=facbd0585c45bc44f4b8521c…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Oct 21 16:54:49 2019 -0500 quartz/filtergraph: Set the current position in IMediaFilter::Stop(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filtergraph.c | 4 ++++ dlls/quartz/tests/filtergraph.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index f7ca192c13..182ea5a2be 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -5207,6 +5207,10 @@ static HRESULT WINAPI MediaFilter_Stop(IMediaFilter *iface) SendFilterMessage(graph, SendStop, 0); graph->state = State_Stopped; + /* Update the current position, probably to synchronize multiple streams. */ + IMediaSeeking_SetPositions(&graph->IMediaSeeking_iface, &graph->current_pos, + AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); + LeaveCriticalSection(&graph->cs); return S_OK; } diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index d5e205ef79..4b9b3b675c 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -3952,7 +3952,7 @@ static void test_graph_seeking(void) ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IMediaSeeking_GetCurrentPosition(seeking, &time); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(time == 12340000, "Got time %s.\n", wine_dbgstr_longlong(time)); + ok(time == 12340000, "Got time %s.\n", wine_dbgstr_longlong(time)); hr = IMediaFilter_SetSyncSource(filter, NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -3968,7 +3968,7 @@ static void test_graph_seeking(void) hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); ok(hr == S_OK, "Got hr %#x.\n", hr); todo_wine ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current)); - todo_wine ok(!stop, "Got time %s.\n", wine_dbgstr_longlong(stop)); + ok(!stop, "Got time %s.\n", wine_dbgstr_longlong(stop)); hr = IMediaControl_Stop(control); ok(hr == S_OK, "Got hr %#x.\n", hr);
1
0
0
0
Zebediah Figura : quartz/filtergraph: Store the current position and return it in IMediaSeeking::GetCurrentPosition().
by Alexandre Julliard
22 Oct '19
22 Oct '19
Module: wine Branch: master Commit: 539fa6922b068440d3f3669cfa219d234e0c611e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=539fa6922b068440d3f3669c…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Oct 21 16:54:48 2019 -0500 quartz/filtergraph: Store the current position and return it in IMediaSeeking::GetCurrentPosition(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filtergraph.c | 41 +++++++++++++++++++++++++++-------------- dlls/quartz/tests/filtergraph.c | 12 ++++++------ dlls/wmp/tests/media.c | 4 +--- 3 files changed, 34 insertions(+), 23 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 966f427b15..f7ca192c13 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -210,6 +210,8 @@ typedef struct _IFilterGraphImpl { HANDLE message_thread, message_thread_ret; DWORD message_thread_id; + + LONGLONG current_pos; } IFilterGraphImpl; struct enum_filters @@ -2505,27 +2507,32 @@ static HRESULT WINAPI MediaSeeking_GetStopPosition(IMediaSeeking *iface, LONGLON return hr; } -static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONGLONG *pCurrent) +static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONGLONG *current) { - IFilterGraphImpl *This = impl_from_IMediaSeeking(iface); - LONGLONG time = 0; + IFilterGraphImpl *graph = impl_from_IMediaSeeking(iface); + LONGLONG ret = graph->current_pos; + + TRACE("graph %p, current %p.\n", graph, current); - if (!pCurrent) + if (!current) return E_POINTER; - EnterCriticalSection(&This->cs); - if (This->state == State_Running && This->refClock && This->start_time >= 0) + EnterCriticalSection(&graph->cs); + + if (graph->state == State_Running && graph->refClock && graph->start_time >= 0) { - IReferenceClock_GetTime(This->refClock, &time); + REFERENCE_TIME time; + IReferenceClock_GetTime(graph->refClock, &time); if (time) - time -= This->start_time; + ret += time - graph->start_time; } - if (This->pause_time > 0) - time += This->pause_time; - *pCurrent = time; - LeaveCriticalSection(&This->cs); - TRACE("Time: %u.%03u\n", (DWORD)(*pCurrent / 10000000), (DWORD)((*pCurrent / 10000)%1000)); + if (graph->pause_time > 0) + ret += graph->pause_time; + LeaveCriticalSection(&graph->cs); + + TRACE("Returning %s.\n", wine_dbgstr_longlong(ret)); + *current = ret; return S_OK; } @@ -2586,7 +2593,8 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * if (FAILED(IBaseFilter_QueryInterface(filter->filter, &IID_IMediaSeeking, (void **)&seeking))) continue; - filter_hr = IMediaSeeking_SetPositions(seeking, ¤t, current_flags, &stop, stop_flags); + filter_hr = IMediaSeeking_SetPositions(seeking, ¤t, + current_flags | AM_SEEKING_ReturnTime, &stop, stop_flags); IMediaSeeking_Release(seeking); if (SUCCEEDED(filter_hr)) { @@ -2596,6 +2604,7 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * *current_ptr = current; if (stop_ptr && (stop_flags & AM_SEEKING_ReturnTime)) *stop_ptr = stop; + graph->current_pos = current; } else if (filter_hr != E_NOTIMPL) { @@ -5220,7 +5229,10 @@ static HRESULT WINAPI MediaFilter_Pause(IMediaFilter *iface) IFilterGraph2_SetDefaultSyncSource(&graph->IFilterGraph2_iface); if (graph->state == State_Running && graph->refClock && graph->start_time >= 0) + { IReferenceClock_GetTime(graph->refClock, &graph->pause_time); + graph->current_pos += graph->pause_time - graph->start_time; + } else graph->pause_time = -1; @@ -5714,6 +5726,7 @@ static HRESULT filter_graph_common_create(IUnknown *outer, void **out, BOOL thre fimpl->punkFilterMapper2 = NULL; fimpl->recursioncount = 0; fimpl->version = 0; + fimpl->current_pos = 0; if (threaded) { diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index bffbc82b98..d5e205ef79 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -3838,12 +3838,12 @@ static void test_graph_seeking(void) hr = IMediaSeeking_GetCurrentPosition(seeking, &time); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(time == 12340000, "Got time %s.\n", wine_dbgstr_longlong(time)); + ok(time == 12340000, "Got time %s.\n", wine_dbgstr_longlong(time)); current = stop = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(current == 12340000, "Got time %s.\n", wine_dbgstr_longlong(current)); + ok(current == 12340000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(stop)); current = 0x123; @@ -3908,12 +3908,12 @@ static void test_graph_seeking(void) hr = IMediaSeeking_GetCurrentPosition(seeking, &time); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(abs(time - 1234 * 10000) < 40 * 10000, + ok(abs(time - 1234 * 10000) < 40 * 10000, "Expected about 1234ms, got %s.\n", wine_dbgstr_longlong(time)); current = stop = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(abs(current - 1234 * 10000) < 40 * 10000, + ok(abs(current - 1234 * 10000) < 40 * 10000, "Expected about 1234ms, got %s.\n", wine_dbgstr_longlong(current)); ok(stop == 9000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop)); @@ -3921,12 +3921,12 @@ static void test_graph_seeking(void) hr = IMediaSeeking_GetCurrentPosition(seeking, &time); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(abs(time - 1334 * 10000) < 40 * 10000, + ok(abs(time - 1334 * 10000) < 40 * 10000, "Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(time)); current = stop = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(abs(current - 1334 * 10000) < 40 * 10000, + ok(abs(current - 1334 * 10000) < 40 * 10000, "Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(current)); ok(stop == 9000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop)); diff --git a/dlls/wmp/tests/media.c b/dlls/wmp/tests/media.c index fee18fd556..9857a7e7ae 100644 --- a/dlls/wmp/tests/media.c +++ b/dlls/wmp/tests/media.c @@ -413,9 +413,7 @@ static BOOL test_wmp(void) duration = 0.0; hres = IWMPControls_get_currentPosition(controls, &duration); ok(hres == S_OK, "IWMPControls_get_currentPosition failed: %08x\n", hres); - /* builtin quartz does not handle this currently and resets to 0.0, works - * with native quartz */ - todo_wine ok(duration >= 1.05 /* save some fp errors */, "unexpected value %f\n", duration); + ok(duration >= 1.05 /* save some fp errors */, "unexpected value %f\n", duration); hres = IWMPPlayer4_get_currentMedia(player4, &media); ok(hres == S_OK, "IWMPPlayer4_get_currentMedia failed: %08x\n", hres);
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
62
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
Results per page:
10
25
50
100
200