winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
743 discussions
Start a n
N
ew thread
Zhiyi Zhang : user32/tests: Test EnumDisplayMonitors().
by Alexandre Julliard
05 May '20
05 May '20
Module: wine Branch: master Commit: 065690be32e4b72fdf9418b82c2f1b02107abced URL:
https://source.winehq.org/git/wine.git/?a=commit;h=065690be32e4b72fdf9418b8…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue May 5 20:30:30 2020 +0800 user32/tests: Test EnumDisplayMonitors(). Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/monitor.c | 116 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c index 05e70c4b62..63cbe5067c 100644 --- a/dlls/user32/tests/monitor.c +++ b/dlls/user32/tests/monitor.c @@ -1154,11 +1154,127 @@ static void test_display_config(void) ok((modes == 0 || modes == 100) && paths == 0, "got %u, %u\n", modes, paths); } +static BOOL CALLBACK test_EnumDisplayMonitors_normal_cb(HMONITOR monitor, HDC hdc, LPRECT rect, + LPARAM lparam) +{ + MONITORINFO mi; + LONG ret; + + mi.cbSize = sizeof(mi); + ret = GetMonitorInfoA(monitor, &mi); + ok(ret, "GetMonitorInfoA failed, error %#x.\n", GetLastError()); + ok(EqualRect(rect, &mi.rcMonitor), "Expected rect %s, got %s.\n", + wine_dbgstr_rect(&mi.rcMonitor), wine_dbgstr_rect(rect)); + + return TRUE; +} + +static BOOL CALLBACK test_EnumDisplayMonitors_return_false_cb(HMONITOR monitor, HDC hdc, + LPRECT rect, LPARAM lparam) +{ + return FALSE; +} + +static BOOL CALLBACK test_EnumDisplayMonitors_invalid_handle_cb(HMONITOR monitor, HDC hdc, + LPRECT rect, LPARAM lparam) +{ + MONITORINFOEXA mi, mi2; + DEVMODEA old_dm, dm; + INT count; + LONG ret; + + mi.cbSize = sizeof(mi); + ret = GetMonitorInfoA(monitor, (MONITORINFO *)&mi); + ok(ret, "GetMonitorInfoA failed, error %#x.\n", GetLastError()); + + /* Test that monitor handle is invalid after the monitor is detached */ + if (!(mi.dwFlags & MONITORINFOF_PRIMARY)) + { + count = GetSystemMetrics(SM_CMONITORS); + + /* Save current display settings */ + memset(&old_dm, 0, sizeof(old_dm)); + old_dm.dmSize = sizeof(old_dm); + ret = EnumDisplaySettingsA(mi.szDevice, ENUM_CURRENT_SETTINGS, &old_dm); + ok(ret, "EnumDisplaySettingsA %s failed, error %#x.\n", mi.szDevice, GetLastError()); + + /* Detach monitor */ + memset(&dm, 0, sizeof(dm)); + dm.dmSize = sizeof(dm); + dm.dmFields = DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT; + dm.dmPosition.x = mi.rcMonitor.left; + dm.dmPosition.y = mi.rcMonitor.top; + ret = ChangeDisplaySettingsExA(mi.szDevice, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, + NULL); + ok(ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d.\n", + mi.szDevice, ret); + ret = ChangeDisplaySettingsExA(mi.szDevice, NULL, NULL, 0, NULL); + ok(ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d.\n", + mi.szDevice, ret); + + /* Check if it's really detached */ + if (GetSystemMetrics(SM_CMONITORS) != count - 1) + { + skip("Failed to detach %s.\n", mi.szDevice); + return TRUE; + } + + /* The monitor handle should be invalid now */ + mi2.cbSize = sizeof(mi2); + ret = GetMonitorInfoA(monitor, (MONITORINFO *)&mi2); + ok(!ret, "GetMonitorInfoA succeeded.\n"); + + /* Restore the original display settings */ + ret = ChangeDisplaySettingsExA(mi.szDevice, &old_dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, + NULL); + ok(ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d.\n", + mi.szDevice, ret); + ret = ChangeDisplaySettingsExA(mi.szDevice, NULL, NULL, 0, NULL); + ok(ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d.\n", + mi.szDevice, ret); + } + + return TRUE; +} + +static void test_EnumDisplayMonitors(void) +{ + DWORD error; + INT count; + BOOL ret; + + ret = EnumDisplayMonitors(NULL, NULL, test_EnumDisplayMonitors_normal_cb, 0); + ok(ret, "EnumDisplayMonitors failed, error %#x.\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = EnumDisplayMonitors(NULL, NULL, test_EnumDisplayMonitors_return_false_cb, 0); + error = GetLastError(); + ok(!ret, "EnumDisplayMonitors succeeded.\n"); + ok(error == 0xdeadbeef, "Expected error %#x, got %#x.\n", 0xdeadbeef, error); + + count = GetSystemMetrics(SM_CMONITORS); + SetLastError(0xdeadbeef); + ret = EnumDisplayMonitors(NULL, NULL, test_EnumDisplayMonitors_invalid_handle_cb, 0); + error = GetLastError(); + if (count >= 2) + { + todo_wine ok(!ret, "EnumDisplayMonitors succeeded.\n"); + todo_wine ok(error == ERROR_INVALID_MONITOR_HANDLE || error == ERROR_INVALID_HANDLE, + "Expected error %#x, got %#x.\n", ERROR_INVALID_MONITOR_HANDLE, error); + } + else + { + ok(ret, "EnumDisplayMonitors failed.\n"); + ok(error == 0xdeadbeef, "Expected error %#x, got %#x.\n", 0xdeadbeef, error); + } +} + START_TEST(monitor) { init_function_pointers(); test_enumdisplaydevices(); test_ChangeDisplaySettingsEx(); + test_EnumDisplayMonitors(); test_monitors(); test_work_area(); test_display_config();
1
0
0
0
Zhiyi Zhang : user32/tests: Fix a ChangeDisplaySettings() test.
by Alexandre Julliard
05 May '20
05 May '20
Module: wine Branch: master Commit: 1bb2b160424a14a1162b6ae3429e49693150f406 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1bb2b160424a14a1162b6ae3…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue May 5 20:30:19 2020 +0800 user32/tests: Fix a ChangeDisplaySettings() test. Overlapped monitor rectangles should be automatically adjusted to avoid overlaps. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/monitor.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c index 080f040c3f..05e70c4b62 100644 --- a/dlls/user32/tests/monitor.c +++ b/dlls/user32/tests/monitor.c @@ -757,26 +757,35 @@ static void test_ChangeDisplaySettingsEx(void) if (res) { + /* The secondary adapter should be to the right of the primary adapter */ + todo_wine ok(dm2.dmPosition.x == dm.dmPosition.x + dm.dmPelsWidth, + "Expected dm2.dmPosition.x %d, got %d.\n", dm.dmPosition.x + dm.dmPelsWidth, + dm2.dmPosition.x); + ok(dm2.dmPosition.y == dm.dmPosition.y, "Expected dm2.dmPosition.y %d, got %d.\n", + dm.dmPosition.y, dm2.dmPosition.y); + /* Test position conflict */ - dm2.dmPosition.x = dm.dmPosition.x; + dm2.dmPosition.x = dm.dmPosition.x - dm2.dmPelsWidth + 1; dm2.dmPosition.y = dm.dmPosition.y; res = ChangeDisplaySettingsExA(devices[1].name, &dm2, NULL, CDS_RESET, NULL); ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[1].name, res); - /* Position is not changed even if ChangeDisplaySettingsExA returned DISP_CHANGE_SUCCESSFUL */ + /* Position is changed and automatically moved */ memset(&dm2, 0, sizeof(dm2)); dm2.dmSize = sizeof(dm2); res = EnumDisplaySettingsA(devices[1].name, ENUM_CURRENT_SETTINGS, &dm2); ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[1].name, GetLastError()); - todo_wine ok(dm2.dmPosition.x != dm.dmPosition.x, "Expect position change not applied.\n"); + todo_wine ok((dm2.dmPosition.x == dm.dmPosition.x - dm2.dmPelsWidth), + "Expected dmPosition.x %d, got %d.\n", dm.dmPosition.x - dm2.dmPelsWidth, + dm2.dmPosition.x); /* Test position with extra space. The extra space will be removed */ - dm2.dmPosition.x = dm.dmPosition.x - dm2.dmPelsWidth - dm2.dmPelsWidth / 2; + dm2.dmPosition.x = dm.dmPosition.x + dm.dmPelsWidth + 1; dm2.dmPosition.y = dm.dmPosition.y; res = ChangeDisplaySettingsExA(devices[1].name, &dm2, NULL, CDS_RESET, NULL); ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s returned unexpected %d\n", devices[1].name, res); - dm2.dmPosition.x = dm.dmPosition.x - dm2.dmPelsWidth; + dm2.dmPosition.x = dm.dmPosition.x + dm.dmPelsWidth; expect_dm(dm2, devices[1].name, 0); /* Test placing the secondary adapter to all sides of the primary adapter */
1
0
0
0
Zhiyi Zhang : user32/tests: Flush messages after mode changes.
by Alexandre Julliard
05 May '20
05 May '20
Module: wine Branch: master Commit: 4369aaae5705092324576b6295799f37c60e6615 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4369aaae5705092324576b62…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue May 5 20:30:07 2020 +0800 user32/tests: Flush messages after mode changes. test_ChangeDisplaySettingsEx() can generate so many posted messages for display change events that USERPostMessageLimit is reached and ERROR_NOT_ENOUGH_QUOTA is returned for PostMessage(). Call flush_events() after mode changes to limit message post rate. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48586
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/monitor.c | 59 +++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 31 deletions(-) diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c index e669b2b82e..080f040c3f 100644 --- a/dlls/user32/tests/monitor.c +++ b/dlls/user32/tests/monitor.c @@ -46,6 +46,23 @@ static void init_function_pointers(void) #undef GET_PROC } +static void flush_events(void) +{ + int diff = 1000; + DWORD time; + MSG msg; + + time = GetTickCount() + diff; + while (diff > 0) + { + if (MsgWaitForMultipleObjects(0, NULL, FALSE, 200, QS_ALLINPUT) == WAIT_TIMEOUT) + break; + while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) + DispatchMessageA(&msg); + diff = time - GetTickCount(); + } +} + static BOOL CALLBACK monitor_enum_proc(HMONITOR hmon, HDC hdc, LPRECT lprc, LPARAM lparam) { @@ -290,12 +307,6 @@ static void _expect_dm(INT line, DEVMODEA expected, const CHAR *device, DWORD te dm.dmSize = sizeof(dm); SetLastError(0xdeadbeef); ret = EnumDisplaySettingsA(device, ENUM_CURRENT_SETTINGS, &dm); - /* On win10 TestBot, after many resolution changes, EnumDisplaySettingsA fails sometimes for unknown reasons */ - if (!ret) - { - win_skip_(__FILE__, line)("EnumDisplaySettingsA failed.\n"); - return; - } ok_(__FILE__, line)(ret, "Device %s test %d EnumDisplaySettingsA failed, error %#x\n", device, test, GetLastError()); ok(get_primary_adapter(primary_adapter), "Failed to get primary adapter name.\n"); @@ -649,6 +660,7 @@ static void test_ChangeDisplaySettingsEx(void) continue; } + flush_events(); expect_dm(dm, devices[device].name, mode); } @@ -662,14 +674,7 @@ static void test_ChangeDisplaySettingsEx(void) memset(&dm, 0, sizeof(dm)); dm.dmSize = sizeof(dm); res = EnumDisplaySettingsA(devices[device].name, ENUM_CURRENT_SETTINGS, &dm); - /* After many resolution changes, EnumDisplaySettingsA may fail on win10 TestBot */ - ok(res || broken(!res), "EnumDisplaySettingsA %s failed, error %#x\n", - devices[device].name, GetLastError()); - if (!res) - { - win_skip("EnumDisplaySettingsA %s failed, error %#x\n", devices[device].name, GetLastError()); - continue; - } + ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[device].name, GetLastError()); position.x = dm.dmPosition.x + dm.dmPelsWidth; } @@ -679,13 +684,7 @@ static void test_ChangeDisplaySettingsEx(void) memset(&dm, 0, sizeof(dm)); dm.dmSize = sizeof(dm); res = EnumDisplaySettingsA(devices[device].name, ENUM_CURRENT_SETTINGS, &dm); - /* After many resolution changes, EnumDisplaySettingsA may fail on win10 TestBot */ - ok(res || broken(!res), "EnumDisplaySettingsA %s failed, error %#x\n", devices[device].name, GetLastError()); - if (!res) - { - win_skip("EnumDisplaySettingsA %s failed, error %#x\n", devices[device].name, GetLastError()); - continue; - } + ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[device].name, GetLastError()); /* Find a mode that's different from the current mode */ memset(&dm2, 0, sizeof(dm2)); @@ -714,6 +713,7 @@ static void test_ChangeDisplaySettingsEx(void) continue; } + flush_events(); expect_dm(dm, devices[device].name, 0); } @@ -744,8 +744,7 @@ static void test_ChangeDisplaySettingsEx(void) memset(&dm, 0, sizeof(dm)); dm.dmSize = sizeof(dm); res = EnumDisplaySettingsA(devices[0].name, ENUM_CURRENT_SETTINGS, &dm); - /* After many resolution changes, EnumDisplaySettingsA may fail on win10 TestBot */ - ok(res || broken(!res), "EnumDisplaySettingsA %s failed, error %#x\n", devices[0].name, GetLastError()); + ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[0].name, GetLastError()); if (res) { @@ -753,8 +752,7 @@ static void test_ChangeDisplaySettingsEx(void) memset(&dm2, 0, sizeof(dm2)); dm2.dmSize = sizeof(dm2); res = EnumDisplaySettingsA(devices[1].name, ENUM_CURRENT_SETTINGS, &dm2); - /* After many resolution changes, EnumDisplaySettingsA may fail on win10 TestBot */ - ok(res || broken(!res), "EnumDisplaySettingsA %s failed, error %#x\n", devices[1].name, GetLastError()); + ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[1].name, GetLastError()); } if (res) @@ -769,9 +767,8 @@ static void test_ChangeDisplaySettingsEx(void) memset(&dm2, 0, sizeof(dm2)); dm2.dmSize = sizeof(dm2); res = EnumDisplaySettingsA(devices[1].name, ENUM_CURRENT_SETTINGS, &dm2); - /* After many resolution changes, EnumDisplaySettingsA may fail on win10 TestBot */ - ok(res || broken(!res), "EnumDisplaySettingsA %s failed, error %#x\n", devices[1].name, GetLastError()); - todo_wine ok(dm2.dmPosition.x != dm.dmPosition.x || broken(!res), "Expect position change not applied.\n"); + ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[1].name, GetLastError()); + todo_wine ok(dm2.dmPosition.x != dm.dmPosition.x, "Expect position change not applied.\n"); /* Test position with extra space. The extra space will be removed */ dm2.dmPosition.x = dm.dmPosition.x - dm2.dmPelsWidth - dm2.dmPelsWidth / 2; @@ -818,6 +815,7 @@ static void test_ChangeDisplaySettingsEx(void) continue; } + flush_events(); expect_dm(dm2, devices[1].name, side); } @@ -841,9 +839,8 @@ static void test_ChangeDisplaySettingsEx(void) memset(&dm2, 0, sizeof(dm2)); dm2.dmSize = sizeof(dm2); res = EnumDisplaySettingsA(devices[1].name, ENUM_CURRENT_SETTINGS, &dm2); - /* After many resolution changes, EnumDisplaySettingsA may fail on win10 TestBot */ - ok(res || broken(!res), "EnumDisplaySettingsA %s failed, error %#x\n", devices[1].name, GetLastError()); - todo_wine ok(dm2.dmPosition.x == dm.dmPelsWidth || broken(!res), "Expect dmPosition.x %d, got %d\n", + ok(res, "EnumDisplaySettingsA %s failed, error %#x\n", devices[1].name, GetLastError()); + todo_wine ok(dm2.dmPosition.x == dm.dmPelsWidth, "Expect dmPosition.x %d, got %d\n", dm.dmPelsWidth, dm2.dmPosition.x); } else
1
0
0
0
Jacek Caban : wbemprox: Use __cpuid from intrin.h.
by Alexandre Julliard
05 May '20
05 May '20
Module: wine Branch: master Commit: 8b6c86eb824d1f529dab7bbbbd09907f41c182d3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8b6c86eb824d1f529dab7bbb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue May 5 02:52:56 2020 +0200 wbemprox: Use __cpuid from intrin.h. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wbemprox/builtin.c | 55 ++++++++++++------------------------------------- 1 file changed, 13 insertions(+), 42 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 24badb7bf9..5d39984d4c 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -21,6 +21,7 @@ #define NONAMELESSSTRUCT #include <stdarg.h> +#include <intrin.h> #include "ntstatus.h" #define WIN32_NO_STATUS @@ -3038,46 +3039,14 @@ done: return status; } -extern void do_cpuid( unsigned int ax, unsigned int *p ); -#if defined(_MSC_VER) -void do_cpuid( unsigned int ax, unsigned int *p ) +void do_cpuid( unsigned int ax, int *p ) { +#if defined(__i386__) || defined(__x86_64__) __cpuid( p, ax ); -} -#elif defined(__i386__) -__ASM_GLOBAL_FUNC( do_cpuid, - "pushl %esi\n\t" - "pushl %ebx\n\t" - "movl 12(%esp),%eax\n\t" - "movl 16(%esp),%esi\n\t" - "cpuid\n\t" - "movl %eax,(%esi)\n\t" - "movl %ebx,4(%esi)\n\t" - "movl %ecx,8(%esi)\n\t" - "movl %edx,12(%esi)\n\t" - "popl %ebx\n\t" - "popl %esi\n\t" - "ret" ) -#elif defined(__x86_64__) -__ASM_GLOBAL_FUNC( do_cpuid, - "pushq %rsi\n\t" - "pushq %rbx\n\t" - "movq %rcx,%rax\n\t" - "movq %rdx,%rsi\n\t" - "cpuid\n\t" - "movl %eax,(%rsi)\n\t" - "movl %ebx,4(%rsi)\n\t" - "movl %ecx,8(%rsi)\n\t" - "movl %edx,12(%rsi)\n\t" - "popq %rbx\n\t" - "popq %rsi\n\t" - "ret" ) #else -void do_cpuid( unsigned int ax, unsigned int *p ) -{ FIXME("\n"); -} #endif +} static unsigned int get_processor_model( unsigned int reg0, unsigned int *stepping, unsigned int *family ) { @@ -3093,7 +3062,7 @@ static unsigned int get_processor_model( unsigned int reg0, unsigned int *steppi *stepping = reg0 & 0x0f; return model; } -static void regs_to_str( unsigned int *regs, unsigned int len, WCHAR *buffer ) +static void regs_to_str( int *regs, unsigned int len, WCHAR *buffer ) { unsigned int i; unsigned char *p = (unsigned char *)regs; @@ -3103,7 +3072,7 @@ static void regs_to_str( unsigned int *regs, unsigned int len, WCHAR *buffer ) } static void get_processor_manufacturer( WCHAR *manufacturer, UINT len ) { - unsigned int tmp, regs[4] = {0, 0, 0, 0}; + int tmp, regs[4] = {0, 0, 0, 0}; do_cpuid( 0, regs ); tmp = regs[2]; /* swap edx and ecx */ @@ -3123,7 +3092,8 @@ static void get_processor_caption( WCHAR *caption, UINT len ) { const WCHAR *arch; WCHAR manufacturer[13]; - unsigned int regs[4] = {0, 0, 0, 0}, family, model, stepping; + int regs[4] = {0, 0, 0, 0}; + unsigned int family, model, stepping; get_processor_manufacturer( manufacturer, ARRAY_SIZE( manufacturer ) ); if (!wcscmp( get_osarchitecture(), L"32-bit" )) arch = L"x86"; @@ -3137,7 +3107,8 @@ static void get_processor_caption( WCHAR *caption, UINT len ) } static void get_processor_version( WCHAR *version, UINT len ) { - unsigned int regs[4] = {0, 0, 0, 0}, model, stepping; + int regs[4] = {0, 0, 0, 0}; + unsigned int model, stepping; do_cpuid( 1, regs ); @@ -3146,20 +3117,20 @@ static void get_processor_version( WCHAR *version, UINT len ) } static UINT16 get_processor_revision(void) { - unsigned int regs[4] = {0, 0, 0, 0}; + int regs[4] = {0, 0, 0, 0}; do_cpuid( 1, regs ); return regs[0]; } static void get_processor_id( WCHAR *processor_id, UINT len ) { - unsigned int regs[4] = {0, 0, 0, 0}; + int regs[4] = {0, 0, 0, 0}; do_cpuid( 1, regs ); swprintf( processor_id, len, L"%08X%08X", regs[3], regs[0] ); } static void get_processor_name( WCHAR *name ) { - unsigned int regs[4] = {0, 0, 0, 0}; + int regs[4] = {0, 0, 0, 0}; int i; do_cpuid( 0x80000000, regs );
1
0
0
0
Jacek Caban : wineboot: Use __cpuid from intrin.h.
by Alexandre Julliard
05 May '20
05 May '20
Module: wine Branch: master Commit: d0a57cf98849a0f318ba4202a9f22c3c9533a172 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d0a57cf98849a0f318ba4202…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue May 5 02:52:46 2020 +0200 wineboot: Use __cpuid from intrin.h. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wineboot/wineboot.c | 59 +++++++++----------------------------------- 1 file changed, 12 insertions(+), 47 deletions(-) diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index 54e48d0310..ac0b04d6d8 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -57,6 +57,7 @@ #include <fcntl.h> #include <stdio.h> #include <stdlib.h> +#include <intrin.h> #include <sys/stat.h> #include <unistd.h> #include <windows.h> @@ -195,44 +196,7 @@ static DWORD set_reg_value_dword( HKEY hkey, const WCHAR *name, DWORD value ) #if defined(__i386__) || defined(__x86_64__) -#if defined(_MSC_VER) -static void do_cpuid( unsigned int ax, unsigned int *p ) -{ - __cpuid( p, ax ); -} -#elif defined(__i386__) -extern void __cdecl do_cpuid( unsigned int ax, unsigned int *p ); -__ASM_GLOBAL_FUNC( do_cpuid, - "pushl %esi\n\t" - "pushl %ebx\n\t" - "movl 12(%esp),%eax\n\t" - "movl 16(%esp),%esi\n\t" - "cpuid\n\t" - "movl %eax,(%esi)\n\t" - "movl %ebx,4(%esi)\n\t" - "movl %ecx,8(%esi)\n\t" - "movl %edx,12(%esi)\n\t" - "popl %ebx\n\t" - "popl %esi\n\t" - "ret" ) -#else -extern void __cdecl do_cpuid( unsigned int ax, unsigned int *p ); -__ASM_GLOBAL_FUNC( do_cpuid, - "pushq %rsi\n\t" - "pushq %rbx\n\t" - "movq %rcx,%rax\n\t" - "movq %rdx,%rsi\n\t" - "cpuid\n\t" - "movl %eax,(%rsi)\n\t" - "movl %ebx,4(%rsi)\n\t" - "movl %ecx,8(%rsi)\n\t" - "movl %edx,12(%rsi)\n\t" - "popq %rbx\n\t" - "popq %rsi\n\t" - "ret" ) -#endif - -static void regs_to_str( unsigned int *regs, unsigned int len, WCHAR *buffer ) +static void regs_to_str( int *regs, unsigned int len, WCHAR *buffer ) { unsigned int i; unsigned char *p = (unsigned char *)regs; @@ -259,18 +223,19 @@ static void get_identifier( WCHAR *buf, size_t size, const WCHAR *arch ) { static const WCHAR fmtW[] = {'%','s',' ','F','a','m','i','l','y',' ','%','u',' ','M','o','d','e','l', ' ','%','u',' ','S','t','e','p','p','i','n','g',' ','%','u',0}; - unsigned int regs[4] = {0, 0, 0, 0}, family, model, stepping; + unsigned int family, model, stepping; + int regs[4] = {0, 0, 0, 0}; - do_cpuid( 1, regs ); + __cpuid( regs, 1 ); model = get_model( regs[0], &stepping, &family ); swprintf( buf, size, fmtW, arch, family, model, stepping ); } static void get_vendorid( WCHAR *buf ) { - unsigned int tmp, regs[4] = {0, 0, 0, 0}; + int tmp, regs[4] = {0, 0, 0, 0}; - do_cpuid( 0, regs ); + __cpuid( regs, 0 ); tmp = regs[2]; /* swap edx and ecx */ regs[2] = regs[3]; regs[3] = tmp; @@ -280,17 +245,17 @@ static void get_vendorid( WCHAR *buf ) static void get_namestring( WCHAR *buf ) { - unsigned int regs[4] = {0, 0, 0, 0}; + int regs[4] = {0, 0, 0, 0}; int i; - do_cpuid( 0x80000000, regs ); + __cpuid( regs, 0x80000000 ); if (regs[0] >= 0x80000004) { - do_cpuid( 0x80000002, regs ); + __cpuid( regs, 0x80000002 ); regs_to_str( regs, 16, buf ); - do_cpuid( 0x80000003, regs ); + __cpuid( regs, 0x80000003 ); regs_to_str( regs, 16, buf + 16 ); - do_cpuid( 0x80000004, regs ); + __cpuid( regs, 0x80000004 ); regs_to_str( regs, 16, buf + 32 ); } for (i = lstrlenW(buf) - 1; i >= 0 && buf[i] == ' '; i--) buf[i] = 0;
1
0
0
0
Jacek Caban : include: Add intrin.h and use it to provide __cpuid implementation.
by Alexandre Julliard
05 May '20
05 May '20
Module: wine Branch: master Commit: 48fa25d4dea31318d0c8551ee8f52a0f25f65c51 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=48fa25d4dea31318d0c8551e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue May 5 02:52:26 2020 +0200 include: Add intrin.h and use it to provide __cpuid implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/Makefile.in | 1 + include/msvcrt/intrin.h | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/include/Makefile.in b/include/Makefile.in index 74db5ee151..8aa61021d2 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -450,6 +450,7 @@ SOURCES = \ msvcrt/fenv.h \ msvcrt/float.h \ msvcrt/fpieee.h \ + msvcrt/intrin.h \ msvcrt/inttypes.h \ msvcrt/io.h \ msvcrt/limits.h \ diff --git a/include/msvcrt/intrin.h b/include/msvcrt/intrin.h new file mode 100644 index 0000000000..5ad2776450 --- /dev/null +++ b/include/msvcrt/intrin.h @@ -0,0 +1,25 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the Wine project. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#ifndef _INC_INTRIN +#define _INC_INTRIN + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(__i386__) || defined(__x86_64__) +static inline void __cpuid(int info[4], int ax) +{ + __asm__ ("cpuid" : "=a"(info[0]), "=b" (info[1]), "=c"(info[2]), "=d"(info[3]) : "a"(ax), "c"(0)); +} +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _INC_INTRIN */
1
0
0
0
Zebediah Figura : kernel32/tests: Fix failures in test_GetThreadSelectorEntry() on 32-bit machines.
by Alexandre Julliard
05 May '20
05 May '20
Module: wine Branch: master Commit: 6849be3ffaba0572395f91899f0adf912f817a8e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6849be3ffaba0572395f9189…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon May 4 18:29:42 2020 -0500 kernel32/tests: Fix failures in test_GetThreadSelectorEntry() on 32-bit machines. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/thread.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index e068797ff5..a9869863b4 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -1218,10 +1218,12 @@ static void test_GetThreadSelectorEntry(void) SetLastError( 0xdeadbeef ); ret = GetThreadSelectorEntry(GetCurrentThread(), 0xdeadbeef, &entry); ok(!ret, "GetThreadSelectorEntry(invalid) succeeded\n"); - ok( GetLastError() == ERROR_GEN_FAILURE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_GEN_FAILURE + || GetLastError() == ERROR_INVALID_THREAD_ID /* 32-bit */, "wrong error %u\n", GetLastError() ); ret = GetThreadSelectorEntry(GetCurrentThread(), ctx.SegDs + 0x100, &entry); ok(!ret, "GetThreadSelectorEntry(invalid) succeeded\n"); - ok( GetLastError() == ERROR_GEN_FAILURE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_GEN_FAILURE + || GetLastError() == ERROR_NOACCESS /* 32-bit */, "wrong error %u\n", GetLastError() ); memset(&entry, 0x11, sizeof(entry)); ret = GetThreadSelectorEntry(GetCurrentThread(), ctx.SegFs, &entry);
1
0
0
0
Zebediah Figura : kernel32/tests: Account for unsupported NLSVERSIONINFOEX.
by Alexandre Julliard
05 May '20
05 May '20
Module: wine Branch: master Commit: 42a18cf5fa201c44249589cf4631cc28e05c7509 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=42a18cf5fa201c44249589cf…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon May 4 18:29:41 2020 -0500 kernel32/tests: Account for unsupported NLSVERSIONINFOEX. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/locale.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 4c1e1b4d73..a8efb60eb5 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -6653,17 +6653,29 @@ static void test_NLSVersion(void) win_skip( "GetNLSVersion not available\n" ); return; } + SetLastError( 0xdeadbeef ); memset( &info, 0xcc, sizeof(info) ); - info.dwNLSVersionInfoSize = sizeof(info); + info.dwNLSVersionInfoSize = offsetof( NLSVERSIONINFO, dwEffectiveId ); ret = pGetNLSVersion( COMPARE_STRING, MAKELANGID( LANG_FRENCH, SUBLANG_FRENCH_CANADIAN ), (NLSVERSIONINFO *)&info ); ok( ret, "GetNLSVersion failed err %u\n", GetLastError() ); - ok( info.dwEffectiveId == MAKELANGID( LANG_FRENCH, SUBLANG_FRENCH_CANADIAN ), - "wrong id %x\n", info.dwEffectiveId ); - ok( IsEqualIID( &info.guidCustomVersion, &guid_fr ) || - broken( IsEqualIID( &info.guidCustomVersion, &guid_null )), /* <= win7 */ - "wrong guid %s\n", debugstr_guid(&info.guidCustomVersion) ); + + SetLastError( 0xdeadbeef ); + memset( &info, 0xcc, sizeof(info) ); + info.dwNLSVersionInfoSize = sizeof(info); + ret = pGetNLSVersion( COMPARE_STRING, MAKELANGID( LANG_FRENCH, SUBLANG_FRENCH_CANADIAN ), + (NLSVERSIONINFO *)&info ); + ok( ret || GetLastError() == ERROR_INSUFFICIENT_BUFFER /* < Vista */, + "GetNLSVersion failed err %u\n", GetLastError() ); + if (ret) + { + ok( info.dwEffectiveId == MAKELANGID( LANG_FRENCH, SUBLANG_FRENCH_CANADIAN ), + "wrong id %x\n", info.dwEffectiveId ); + ok( IsEqualIID( &info.guidCustomVersion, &guid_fr ) || + broken( IsEqualIID( &info.guidCustomVersion, &guid_null )), /* <= win7 */ + "wrong guid %s\n", debugstr_guid(&info.guidCustomVersion) ); + } SetLastError( 0xdeadbeef ); info.dwNLSVersionInfoSize = 8;
1
0
0
0
Zebediah Figura : quartz/vmr9: Add a stub IVMRMixerBitmap9 interface.
by Alexandre Julliard
05 May '20
05 May '20
Module: wine Branch: master Commit: 913e6ef805a7a3813cb1e15573ce8d948174d632 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=913e6ef805a7a3813cb1e155…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon May 4 18:05:24 2020 -0500 quartz/vmr9: Add a stub IVMRMixerBitmap9 interface. Needed by Sniper Fury and Modern Combat 5. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr9.c | 2 +- dlls/quartz/vmr9.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 5c08868fc0..189b7d4f89 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -231,7 +231,7 @@ static void test_common_interfaces(IBaseFilter *filter) todo_wine check_interface(filter, &IID_IVMRAspectRatioControl9, TRUE); todo_wine check_interface(filter, &IID_IVMRDeinterlaceControl9, TRUE); check_interface(filter, &IID_IVMRFilterConfig9, TRUE); - todo_wine check_interface(filter, &IID_IVMRMixerBitmap9, TRUE); + check_interface(filter, &IID_IVMRMixerBitmap9, TRUE); check_interface(filter, &IID_IBasicAudio, FALSE); check_interface(filter, &IID_IDirectDrawVideo, FALSE); diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 4fd3e70b96..8ef8fc07e3 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -39,6 +39,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); +static inline const char *debugstr_normalized_rect(const VMR9NormalizedRect *rect) +{ + if (!rect) return "(null)"; + return wine_dbg_sprintf("(%.8e,%.8e)-(%.8e,%.8e)", rect->left, rect->top, rect->right, rect->bottom); +} + struct quartz_vmr { struct strmbase_renderer renderer; @@ -49,6 +55,7 @@ struct quartz_vmr IAMFilterMiscFlags IAMFilterMiscFlags_iface; IVMRFilterConfig IVMRFilterConfig_iface; IVMRFilterConfig9 IVMRFilterConfig9_iface; + IVMRMixerBitmap9 IVMRMixerBitmap9_iface; IVMRMonitorConfig IVMRMonitorConfig_iface; IVMRMonitorConfig9 IVMRMonitorConfig9_iface; IVMRSurfaceAllocatorNotify IVMRSurfaceAllocatorNotify_iface; @@ -632,6 +639,8 @@ static HRESULT vmr_query_interface(struct strmbase_renderer *iface, REFIID iid, *out = &filter->IVMRFilterConfig_iface; else if (IsEqualGUID(iid, &IID_IVMRFilterConfig9)) *out = &filter->IVMRFilterConfig9_iface; + else if (IsEqualGUID(iid, &IID_IVMRMixerBitmap9) && is_vmr9(filter)) + *out = &filter->IVMRMixerBitmap9_iface; else if (IsEqualGUID(iid, &IID_IVMRMonitorConfig)) *out = &filter->IVMRMonitorConfig_iface; else if (IsEqualGUID(iid, &IID_IVMRMonitorConfig9)) @@ -2254,6 +2263,63 @@ static const IVMRSurfaceAllocatorNotify9Vtbl VMR9_SurfaceAllocatorNotify_Vtbl = VMR9SurfaceAllocatorNotify_NotifyEvent }; +static inline struct quartz_vmr *impl_from_IVMRMixerBitmap9(IVMRMixerBitmap9 *iface) +{ + return CONTAINING_RECORD(iface, struct quartz_vmr, IVMRMixerBitmap9_iface); +} + +static HRESULT WINAPI mixer_bitmap9_QueryInterface(IVMRMixerBitmap9 *iface, REFIID iid, void **out) +{ + struct quartz_vmr *filter = impl_from_IVMRMixerBitmap9(iface); + return IUnknown_QueryInterface(filter->renderer.filter.outer_unk, iid, out); +} + +static ULONG WINAPI mixer_bitmap9_AddRef(IVMRMixerBitmap9 *iface) +{ + struct quartz_vmr *filter = impl_from_IVMRMixerBitmap9(iface); + return IUnknown_AddRef(filter->renderer.filter.outer_unk); +} + +static ULONG WINAPI mixer_bitmap9_Release(IVMRMixerBitmap9 *iface) +{ + struct quartz_vmr *filter = impl_from_IVMRMixerBitmap9(iface); + return IUnknown_Release(filter->renderer.filter.outer_unk); +} + +static HRESULT WINAPI mixer_bitmap9_SetAlphaBitmap(IVMRMixerBitmap9 *iface, + const VMR9AlphaBitmap *bitmap) +{ + FIXME("iface %p, bitmap %p, stub!\n", iface, bitmap); + TRACE("dwFlags %#x, hdc %p, pDDS %p, rSrc %s, rDest %s, fAlpha %.8e, clrSrcKey #%06x, dwFilterMode %#x.\n", + bitmap->dwFlags, bitmap->hdc, bitmap->pDDS, wine_dbgstr_rect(&bitmap->rSrc), + debugstr_normalized_rect(&bitmap->rDest), bitmap->fAlpha, bitmap->clrSrcKey, bitmap->dwFilterMode); + return E_NOTIMPL; +} + +static HRESULT WINAPI mixer_bitmap9_UpdateAlphaBitmapParameters(IVMRMixerBitmap9 *iface, + const VMR9AlphaBitmap *bitmap) +{ + FIXME("iface %p, bitmap %p, stub!\n", iface, bitmap); + return E_NOTIMPL; +} + +static HRESULT WINAPI mixer_bitmap9_GetAlphaBitmapParameters(IVMRMixerBitmap9 *iface, + VMR9AlphaBitmap *bitmap) +{ + FIXME("iface %p, bitmap %p, stub!\n", iface, bitmap); + return E_NOTIMPL; +} + +static const IVMRMixerBitmap9Vtbl mixer_bitmap9_vtbl = +{ + mixer_bitmap9_QueryInterface, + mixer_bitmap9_AddRef, + mixer_bitmap9_Release, + mixer_bitmap9_SetAlphaBitmap, + mixer_bitmap9_UpdateAlphaBitmapParameters, + mixer_bitmap9_GetAlphaBitmapParameters, +}; + static inline struct quartz_vmr *impl_from_IOverlay(IOverlay *iface) { return CONTAINING_RECORD(iface, struct quartz_vmr, IOverlay_iface); @@ -2379,6 +2445,7 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid) object->IAMFilterMiscFlags_iface.lpVtbl = &IAMFilterMiscFlags_Vtbl; object->IVMRFilterConfig_iface.lpVtbl = &VMR7_FilterConfig_Vtbl; object->IVMRFilterConfig9_iface.lpVtbl = &VMR9_FilterConfig_Vtbl; + object->IVMRMixerBitmap9_iface.lpVtbl = &mixer_bitmap9_vtbl; object->IVMRMonitorConfig_iface.lpVtbl = &VMR7_MonitorConfig_Vtbl; object->IVMRMonitorConfig9_iface.lpVtbl = &VMR9_MonitorConfig_Vtbl; object->IVMRSurfaceAllocatorNotify_iface.lpVtbl = &VMR7_SurfaceAllocatorNotify_Vtbl;
1
0
0
0
Zebediah Figura : quartz/vmr9: Call IVMRSurfaceAllocator9::TerminateDevice() when destroying the filter.
by Alexandre Julliard
05 May '20
05 May '20
Module: wine Branch: master Commit: e7ed2798e863c2ac56aabf654c61c912e31a4a7f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e7ed2798e863c2ac56aabf65…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon May 4 18:05:23 2020 -0500 quartz/vmr9: Call IVMRSurfaceAllocator9::TerminateDevice() when destroying the filter. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/vmr9.c | 2 +- dlls/quartz/vmr9.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index c0fb6a6f34..5c08868fc0 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -3272,7 +3272,7 @@ static void test_surface_allocator_notify_refcount(void) ref = IBaseFilter_Release(filter); ok(!ref, "Got outstanding refcount %d.\n", ref); - todo_wine ok(allocator_got_TerminateDevice == 1, "Got %u calls to TerminateDevice().\n", + ok(allocator_got_TerminateDevice == 1, "Got %u calls to TerminateDevice().\n", allocator_got_TerminateDevice); ok(allocator_refcount == 1, "Got outstanding refcount %d.\n", allocator_refcount); diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index a8f88e3d04..4fd3e70b96 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -595,7 +595,10 @@ static void vmr_destroy(struct strmbase_renderer *iface) InterlockedIncrement(&filter->renderer.filter.refcount); if (filter->allocator) + { + IVMRSurfaceAllocatorEx9_TerminateDevice(filter->allocator, filter->cookie); IVMRSurfaceAllocatorEx9_Release(filter->allocator); + } if (filter->presenter) IVMRImagePresenter9_Release(filter->presenter);
1
0
0
0
← Newer
1
...
64
65
66
67
68
69
70
...
75
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
Results per page:
10
25
50
100
200