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 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1138 discussions
Start a n
N
ew thread
Eric Pouech : user32/tests: Enable compilation with long types.
by Alexandre Julliard
14 Mar '22
14 Mar '22
Module: wine Branch: master Commit: 8a52d3e93f5690fd0833c228d54a996a784afad7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8a52d3e93f5690fd0833c228…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Sat Mar 12 09:37:32 2022 +0100 user32/tests: Enable compilation with long types. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/static.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/dlls/user32/tests/static.c b/dlls/user32/tests/static.c index 0899f4c6187..39cd93c54da 100644 --- a/dlls/user32/tests/static.c +++ b/dlls/user32/tests/static.c @@ -16,6 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#undef WINE_NO_LONG_TYPES /* temporary for migration */ #include <stdarg.h> #include <stdio.h> @@ -85,19 +86,19 @@ static void test_updates(int style) exstyle = GetWindowLongW(hStatic, GWL_EXSTYLE); if (style == SS_ETCHEDHORZ || style == SS_ETCHEDVERT || style == SS_SUNKEN) - ok(exstyle == WS_EX_STATICEDGE, "expected WS_EX_STATICEDGE, got %d\n", exstyle); + ok(exstyle == WS_EX_STATICEDGE, "expected WS_EX_STATICEDGE, got %ld\n", exstyle); else - ok(exstyle == 0, "expected 0, got %d\n", exstyle); + ok(exstyle == 0, "expected 0, got %ld\n", exstyle); GetClientRect(hStatic, &rcClient); if (style == SS_ETCHEDVERT) - ok(rcClient.right == 0, "expected zero width, got %d\n", rcClient.right); + ok(rcClient.right == 0, "expected zero width, got %ld\n", rcClient.right); else - ok(rcClient.right > 0, "expected non-zero width, got %d\n", rcClient.right); + ok(rcClient.right > 0, "expected non-zero width, got %ld\n", rcClient.right); if (style == SS_ETCHEDHORZ) - ok(rcClient.bottom == 0, "expected zero height, got %d\n", rcClient.bottom); + ok(rcClient.bottom == 0, "expected zero height, got %ld\n", rcClient.bottom); else - ok(rcClient.bottom > 0, "expected non-zero height, got %d\n", rcClient.bottom); + ok(rcClient.bottom > 0, "expected non-zero height, got %ld\n", rcClient.bottom); g_nReceivedColorStatic = 0; /* during each update parent WndProc will test the WM_CTLCOLORSTATIC message */ @@ -217,10 +218,10 @@ static void test_STM_SETIMAGE(void) for (type = SS_LEFT; type < SS_ETCHEDFRAME; type++) { - winetest_push_context("%u", type); + winetest_push_context("%lu", type); hwnd = build_static(type); - ok(hwnd != 0, "failed to create static type %#x\n", type); + ok(hwnd != 0, "failed to create static type %#lx\n", type); /* set icon */ g_nReceivedColorStatic = 0;
1
0
0
0
Eric Pouech : user32/tests: Enable compilation with long types.
by Alexandre Julliard
14 Mar '22
14 Mar '22
Module: wine Branch: master Commit: 4607d822d9bc626f90b7b841df80e7b68db69d17 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4607d822d9bc626f90b7b841…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Sat Mar 12 09:37:26 2022 +0100 user32/tests: Enable compilation with long types. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/scroll.c | 93 +++++++++++++++++++++++----------------------- 1 file changed, 47 insertions(+), 46 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=4607d822d9bc626f90b7…
1
0
0
0
Eric Pouech : user32/tests: Enable compilation with long types.
by Alexandre Julliard
14 Mar '22
14 Mar '22
Module: wine Branch: master Commit: 3d39354998d1f4375a03773dab635d4d3f0b1f05 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3d39354998d1f4375a03773d…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Sat Mar 12 09:37:22 2022 +0100 user32/tests: Enable compilation with long types. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/msg.c | 973 ++++++++++++++++++++++++------------------------ 1 file changed, 487 insertions(+), 486 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=3d39354998d1f4375a03…
1
0
0
0
Eric Pouech : user32/tests: Enable compilation with long types.
by Alexandre Julliard
14 Mar '22
14 Mar '22
Module: wine Branch: master Commit: 66ec7ae37a97205114067d493eedad175db8de90 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=66ec7ae37a97205114067d49…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Sat Mar 12 09:37:18 2022 +0100 user32/tests: Enable compilation with long types. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/monitor.c | 435 ++++++++++++++++++++++---------------------- 1 file changed, 218 insertions(+), 217 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=66ec7ae37a9720511406…
1
0
0
0
Eric Pouech : user32/tests: Enable compilation with long types.
by Alexandre Julliard
14 Mar '22
14 Mar '22
Module: wine Branch: master Commit: 4e40e2cb2e1105bdb9f09609f472fae453e841db URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4e40e2cb2e1105bdb9f09609…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Sat Mar 12 09:37:14 2022 +0100 user32/tests: Enable compilation with long types. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/menu.c | 333 ++++++++++++++++++++++++----------------------- 1 file changed, 167 insertions(+), 166 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=4e40e2cb2e1105bdb9f0…
1
0
0
0
Giovanni Mascellani : mfplat: Properly align memory allocated by IMF2DBuffer.
by Alexandre Julliard
14 Mar '22
14 Mar '22
Module: wine Branch: master Commit: 4b36913660bfedb7e0b73c6ab1ea40caf63a9170 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4b36913660bfedb7e0b73c6a…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Mon Mar 14 17:47:17 2022 +0300 mfplat: Properly align memory allocated by IMF2DBuffer. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/buffer.c | 2 +- dlls/mfplat/tests/mfplat.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/dlls/mfplat/buffer.c b/dlls/mfplat/buffer.c index 1cb84cba944..2ec714c1419 100644 --- a/dlls/mfplat/buffer.c +++ b/dlls/mfplat/buffer.c @@ -1385,7 +1385,7 @@ static HRESULT create_2d_buffer(DWORD width, DWORD height, DWORD fourcc, BOOL bo max_length = pitch * height; } - if (FAILED(hr = memory_buffer_init(object, max_length, MF_1_BYTE_ALIGNMENT, &memory_1d_2d_buffer_vtbl))) + if (FAILED(hr = memory_buffer_init(object, max_length, row_alignment, &memory_1d_2d_buffer_vtbl))) { free(object); return hr; diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index d9c25edaa72..83877041694 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -6005,6 +6005,28 @@ static void test_MFCreate2DMediaBuffer(void) IMFMediaBuffer_Release(buffer); } + + /* Alignment tests */ + for (i = 0; i < ARRAY_SIZE(_2d_buffer_tests); ++i) + { + const struct _2d_buffer_test *ptr = &_2d_buffer_tests[i]; + + hr = pMFCreate2DMediaBuffer(ptr->width, ptr->height, ptr->fourcc, FALSE, &buffer); + ok(hr == S_OK, "Failed to create a buffer, hr %#lx.\n", hr); + + hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&_2dbuffer); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr); + + hr = IMF2DBuffer_Lock2D(_2dbuffer, &data, &pitch); + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr); + ok(((uintptr_t)data & MF_64_BYTE_ALIGNMENT) == 0, "Misaligned data at %p.\n", data); + + hr = IMF2DBuffer_Unlock2D(_2dbuffer); + ok(hr == S_OK, "Failed to unlock buffer, hr %#lx.\n", hr); + + IMF2DBuffer_Release(_2dbuffer); + IMFMediaBuffer_Release(buffer); + } } static void test_MFCreateMediaBufferFromMediaType(void)
1
0
0
0
Rémi Bernon : winebus.sys: Remove the now unused HID haptics combined waveform report.
by Alexandre Julliard
14 Mar '22
14 Mar '22
Module: wine Branch: master Commit: ecc881f731fed583af9af3f626409758c28c86a3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ecc881f731fed583af9af3f6…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Mar 14 10:29:38 2022 +0100 winebus.sys: Remove the now unused HID haptics combined waveform report. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/hid.c | 107 +--------------------------------------- dlls/winebus.sys/unix_private.h | 20 -------- 2 files changed, 2 insertions(+), 125 deletions(-) diff --git a/dlls/winebus.sys/hid.c b/dlls/winebus.sys/hid.c index 46336716a70..5b18da5d8ed 100644 --- a/dlls/winebus.sys/hid.c +++ b/dlls/winebus.sys/hid.c @@ -331,12 +331,6 @@ BOOL hid_device_add_axes(struct unix_device *iface, BYTE count, USAGE usage_page } #include "pshpack1.h" -struct hid_haptics_waveform -{ - UINT16 intensity; - BYTE manual_trigger; - BYTE repeat_count; -}; struct hid_haptics_intensity { UINT16 rumble_intensity; @@ -348,68 +342,7 @@ BOOL hid_device_add_haptics(struct unix_device *iface) { struct hid_report_descriptor *desc = &iface->hid_report_descriptor; const BYTE haptics_features_report = ++desc->next_report_id[HidP_Feature]; - const BYTE haptics_waveform_report = ++desc->next_report_id[HidP_Output]; const BYTE haptics_intensity_report = ++desc->next_report_id[HidP_Output]; - const BYTE waveforms_template[] = - { - USAGE_PAGE(2, HID_USAGE_PAGE_HAPTICS), - USAGE(1, HID_USAGE_HAPTICS_SIMPLE_CONTROLLER), - COLLECTION(1, Logical), - REPORT_ID(1, haptics_features_report), - - USAGE(1, HID_USAGE_HAPTICS_WAVEFORM_LIST), - COLLECTION(1, NamedArray), - USAGE(4, (HID_USAGE_PAGE_ORDINAL<<16)|HAPTICS_WAVEFORM_RUMBLE_ORDINAL), /* HID_USAGE_HAPTICS_WAVEFORM_RUMBLE */ - USAGE(4, (HID_USAGE_PAGE_ORDINAL<<16)|HAPTICS_WAVEFORM_BUZZ_ORDINAL), /* HID_USAGE_HAPTICS_WAVEFORM_BUZZ */ - REPORT_COUNT(1, 2), - REPORT_SIZE(1, 16), - FEATURE(1, Data|Var|Abs|Null), - END_COLLECTION, - - USAGE(1, HID_USAGE_HAPTICS_DURATION_LIST), - COLLECTION(1, NamedArray), - USAGE(4, (HID_USAGE_PAGE_ORDINAL<<16)|HAPTICS_WAVEFORM_RUMBLE_ORDINAL), /* 0 (HID_USAGE_HAPTICS_WAVEFORM_RUMBLE) */ - USAGE(4, (HID_USAGE_PAGE_ORDINAL<<16)|HAPTICS_WAVEFORM_BUZZ_ORDINAL), /* 0 (HID_USAGE_HAPTICS_WAVEFORM_BUZZ) */ - REPORT_COUNT(1, 2), - REPORT_SIZE(1, 16), - FEATURE(1, Data|Var|Abs|Null), - END_COLLECTION, - - USAGE(1, HID_USAGE_HAPTICS_WAVEFORM_CUTOFF_TIME), - UNIT(2, 0x1001), /* seconds */ - UNIT_EXPONENT(1, -3), /* 10^-3 */ - LOGICAL_MINIMUM(4, 0x00000000), - LOGICAL_MAXIMUM(4, 0x7fffffff), - REPORT_SIZE(1, 32), - REPORT_COUNT(1, 1), - FEATURE(1, Data|Var|Abs), - /* reset global items */ - UNIT(1, 0), /* None */ - UNIT_EXPONENT(1, 0), - - REPORT_ID(1, haptics_waveform_report), - USAGE(1, HID_USAGE_HAPTICS_INTENSITY), - LOGICAL_MINIMUM(4, 0x00000000), - LOGICAL_MAXIMUM(4, 0x0000ffff), - REPORT_SIZE(1, 16), - REPORT_COUNT(1, 1), - OUTPUT(1, Data|Var|Abs), - - USAGE(1, HID_USAGE_HAPTICS_MANUAL_TRIGGER), - LOGICAL_MINIMUM(1, HAPTICS_WAVEFORM_NONE_ORDINAL), - LOGICAL_MAXIMUM(1, HAPTICS_WAVEFORM_LAST_ORDINAL), - REPORT_SIZE(1, 8), - REPORT_COUNT(1, 1), - OUTPUT(1, Data|Var|Abs), - - USAGE(1, HID_USAGE_HAPTICS_REPEAT_COUNT), - LOGICAL_MINIMUM(1, 0), - LOGICAL_MAXIMUM(1, 1), - REPORT_SIZE(1, 8), - REPORT_COUNT(1, 1), - OUTPUT(1, Data|Var|Abs), - END_COLLECTION, - }; const BYTE haptics_template[] = { USAGE_PAGE(2, HID_USAGE_PAGE_HAPTICS), @@ -419,6 +352,7 @@ BOOL hid_device_add_haptics(struct unix_device *iface) USAGE(1, HID_USAGE_HAPTICS_WAVEFORM_LIST), COLLECTION(1, NamedArray), + /* ordinal 1 and 2 are reserved for implicit waveforms */ USAGE(4, (HID_USAGE_PAGE_ORDINAL<<16)|3), REPORT_SIZE(1, 16), REPORT_COUNT(1, 1), @@ -427,6 +361,7 @@ BOOL hid_device_add_haptics(struct unix_device *iface) USAGE(1, HID_USAGE_HAPTICS_DURATION_LIST), COLLECTION(1, NamedArray), + /* ordinal 1 and 2 are reserved for implicit waveforms */ USAGE(4, (HID_USAGE_PAGE_ORDINAL<<16)|3), REPORT_SIZE(1, 16), REPORT_COUNT(1, 1), @@ -456,13 +391,7 @@ BOOL hid_device_add_haptics(struct unix_device *iface) }; iface->hid_haptics.features_report = haptics_features_report; - iface->hid_haptics.waveform_report = haptics_waveform_report; iface->hid_haptics.intensity_report = haptics_intensity_report; - iface->hid_haptics.features.waveform_list[0] = HID_USAGE_HAPTICS_WAVEFORM_RUMBLE; - iface->hid_haptics.features.waveform_list[1] = HID_USAGE_HAPTICS_WAVEFORM_BUZZ; - iface->hid_haptics.features.duration_list[0] = 0; - iface->hid_haptics.features.duration_list[1] = 0; - iface->hid_haptics.features.waveform_cutoff_time_ms = 1000; iface->hid_haptics.features.rumble.waveform = HID_USAGE_HAPTICS_WAVEFORM_RUMBLE; iface->hid_haptics.features.rumble.duration = 0; iface->hid_haptics.features.rumble.cutoff_time_ms = 1000; @@ -470,9 +399,6 @@ BOOL hid_device_add_haptics(struct unix_device *iface) iface->hid_haptics.features.buzz.duration = 0; iface->hid_haptics.features.buzz.cutoff_time_ms = 1000; - if (!hid_report_descriptor_append(desc, waveforms_template, sizeof(waveforms_template))) - return FALSE; - if (!hid_report_descriptor_append(desc, haptics_template, sizeof(haptics_template))) return FALSE; if (!hid_report_descriptor_append(desc, haptics_template, sizeof(haptics_template))) @@ -1153,34 +1079,6 @@ static void hid_device_set_output_report(struct unix_device *iface, HID_XFER_PAC io->Status = iface->hid_vtbl->haptics_start(iface, duration_ms, report->rumble_intensity, report->buzz_intensity); } } - else if (packet->reportId == haptics->waveform_report) - { - struct hid_haptics_waveform *report = (struct hid_haptics_waveform *)(packet->reportBuffer + 1); - UINT16 *rumble_intensity = haptics->waveform_intensity + HAPTICS_WAVEFORM_RUMBLE_ORDINAL; - UINT16 *buzz_intensity = haptics->waveform_intensity + HAPTICS_WAVEFORM_BUZZ_ORDINAL; - ULONG duration_ms; - - io->Information = sizeof(*report) + 1; - assert(packet->reportBufferLen == io->Information); - - if (report->manual_trigger == 0 || report->manual_trigger > HAPTICS_WAVEFORM_LAST_ORDINAL) - io->Status = STATUS_INVALID_PARAMETER; - else - { - if (report->manual_trigger == HAPTICS_WAVEFORM_STOP_ORDINAL) - { - memset(haptics->waveform_intensity, 0, sizeof(haptics->waveform_intensity)); - io->Status = iface->hid_vtbl->haptics_stop(iface); - } - else - { - haptics->waveform_intensity[report->manual_trigger] = report->intensity; - duration_ms = haptics->features.waveform_cutoff_time_ms; - if (!report->repeat_count) io->Status = STATUS_SUCCESS; - else io->Status = iface->hid_vtbl->haptics_start(iface, duration_ms, *rumble_intensity, *buzz_intensity); - } - } - } else if (packet->reportId == physical->device_control_report) { struct pid_device_control *report = (struct pid_device_control *)(packet->reportBuffer + 1); @@ -1387,7 +1285,6 @@ static void hid_device_set_feature_report(struct unix_device *iface, HID_XFER_PA io->Information = sizeof(*features) + 1; assert(packet->reportBufferLen == io->Information); - haptics->features.waveform_cutoff_time_ms = features->waveform_cutoff_time_ms; haptics->features.rumble.cutoff_time_ms = features->rumble.cutoff_time_ms; haptics->features.buzz.cutoff_time_ms = features->buzz.cutoff_time_ms; io->Status = STATUS_SUCCESS; diff --git a/dlls/winebus.sys/unix_private.h b/dlls/winebus.sys/unix_private.h index 081e57dc53d..0763d084823 100644 --- a/dlls/winebus.sys/unix_private.h +++ b/dlls/winebus.sys/unix_private.h @@ -123,21 +123,6 @@ struct hid_report_descriptor BYTE next_report_id[3]; }; -/* HID spec uses None / Stop names for the first two implicit waveforms, - * where Windows SDK headers use STOP / NULL for the corresponding HID - * usage constants. We're not actually using the usages anyway are we - * stick to the HID spec here. - */ -enum haptics_waveform_ordinal -{ - HAPTICS_WAVEFORM_NONE_ORDINAL = 1, /* implicit, not included in waveform_list / duration_list */ - HAPTICS_WAVEFORM_STOP_ORDINAL = 2, /* implicit, not included in waveform_list / duration_list */ - HAPTICS_WAVEFORM_RUMBLE_ORDINAL = 3, - HAPTICS_WAVEFORM_BUZZ_ORDINAL = 4, - HAPTICS_WAVEFORM_FIRST_ORDINAL = HAPTICS_WAVEFORM_RUMBLE_ORDINAL, - HAPTICS_WAVEFORM_LAST_ORDINAL = HAPTICS_WAVEFORM_BUZZ_ORDINAL, -}; - #include "pshpack1.h" struct hid_haptics_feature { @@ -148,9 +133,6 @@ struct hid_haptics_feature struct hid_haptics_features { - WORD waveform_list[HAPTICS_WAVEFORM_LAST_ORDINAL - HAPTICS_WAVEFORM_FIRST_ORDINAL + 1]; - WORD duration_list[HAPTICS_WAVEFORM_LAST_ORDINAL - HAPTICS_WAVEFORM_FIRST_ORDINAL + 1]; - UINT waveform_cutoff_time_ms; struct hid_haptics_feature rumble; struct hid_haptics_feature buzz; }; @@ -159,9 +141,7 @@ struct hid_haptics_features struct hid_haptics { struct hid_haptics_features features; - UINT16 waveform_intensity[HAPTICS_WAVEFORM_LAST_ORDINAL + 1]; BYTE features_report; - BYTE waveform_report; BYTE intensity_report; };
1
0
0
0
Rémi Bernon : xinput1_3: Support multiple HID simple haptics controller collections.
by Alexandre Julliard
14 Mar '22
14 Mar '22
Module: wine Branch: master Commit: ec059e2b7e046ad1a28162279416d6e6b8018700 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ec059e2b7e046ad1a2816227…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Mar 14 10:29:37 2022 +0100 xinput1_3: Support multiple HID simple haptics controller collections. With individual waveform intensity caps, instead of a complicated waveform manual trigger. Also ignore collections with Z/RZ physical usages, later used to describe trigger haptics controllers. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xinput1_3/main.c | 224 +++++++++++++++++++++----------------------------- 1 file changed, 93 insertions(+), 131 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=ec059e2b7e046ad1a281…
1
0
0
0
Rémi Bernon : winebus.sys: Declare multiple HID simple haptics controller collections.
by Alexandre Julliard
14 Mar '22
14 Mar '22
Module: wine Branch: master Commit: e651f56e795e089f2e418ef0cbf21ab216b5f882 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e651f56e795e089f2e418ef0…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Mar 14 10:29:36 2022 +0100 winebus.sys: Declare multiple HID simple haptics controller collections. Instead of having the waveforms combined. This better matches what Windows.Gaming.Input and Windows.Devices.Haptics are exposing, with one SimpleHapticsController for each motor. This will also simplify the declaration of left/right trigger motors. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/hid.c | 89 +++++++++++++++++++++++++++++++++++++++-- dlls/winebus.sys/unix_private.h | 12 ++++++ 2 files changed, 98 insertions(+), 3 deletions(-) diff --git a/dlls/winebus.sys/hid.c b/dlls/winebus.sys/hid.c index 3e83a05cdf6..46336716a70 100644 --- a/dlls/winebus.sys/hid.c +++ b/dlls/winebus.sys/hid.c @@ -337,6 +337,11 @@ struct hid_haptics_waveform BYTE manual_trigger; BYTE repeat_count; }; +struct hid_haptics_intensity +{ + UINT16 rumble_intensity; + UINT16 buzz_intensity; +}; #include "poppack.h" BOOL hid_device_add_haptics(struct unix_device *iface) @@ -344,7 +349,8 @@ BOOL hid_device_add_haptics(struct unix_device *iface) struct hid_report_descriptor *desc = &iface->hid_report_descriptor; const BYTE haptics_features_report = ++desc->next_report_id[HidP_Feature]; const BYTE haptics_waveform_report = ++desc->next_report_id[HidP_Output]; - const BYTE haptics_template[] = + const BYTE haptics_intensity_report = ++desc->next_report_id[HidP_Output]; + const BYTE waveforms_template[] = { USAGE_PAGE(2, HID_USAGE_PAGE_HAPTICS), USAGE(1, HID_USAGE_HAPTICS_SIMPLE_CONTROLLER), @@ -404,16 +410,75 @@ BOOL hid_device_add_haptics(struct unix_device *iface) OUTPUT(1, Data|Var|Abs), END_COLLECTION, }; + const BYTE haptics_template[] = + { + USAGE_PAGE(2, HID_USAGE_PAGE_HAPTICS), + USAGE(1, HID_USAGE_HAPTICS_SIMPLE_CONTROLLER), + COLLECTION(1, Logical), + REPORT_ID(1, haptics_features_report), + + USAGE(1, HID_USAGE_HAPTICS_WAVEFORM_LIST), + COLLECTION(1, NamedArray), + USAGE(4, (HID_USAGE_PAGE_ORDINAL<<16)|3), + REPORT_SIZE(1, 16), + REPORT_COUNT(1, 1), + FEATURE(1, Data|Var|Abs|Null), + END_COLLECTION, + + USAGE(1, HID_USAGE_HAPTICS_DURATION_LIST), + COLLECTION(1, NamedArray), + USAGE(4, (HID_USAGE_PAGE_ORDINAL<<16)|3), + REPORT_SIZE(1, 16), + REPORT_COUNT(1, 1), + FEATURE(1, Data|Var|Abs|Null), + END_COLLECTION, + + USAGE(1, HID_USAGE_HAPTICS_WAVEFORM_CUTOFF_TIME), + UNIT(2, 0x1001), /* seconds */ + UNIT_EXPONENT(1, -3), /* 10^-3 */ + LOGICAL_MINIMUM(4, 0x00000000), + LOGICAL_MAXIMUM(4, 0x7fffffff), + REPORT_SIZE(1, 32), + REPORT_COUNT(1, 1), + FEATURE(1, Data|Var|Abs), + /* reset global items */ + UNIT(1, 0), /* None */ + UNIT_EXPONENT(1, 0), + + REPORT_ID(1, haptics_intensity_report), + USAGE(1, HID_USAGE_HAPTICS_INTENSITY), + LOGICAL_MINIMUM(4, 0x00000000), + LOGICAL_MAXIMUM(4, 0x0000ffff), + REPORT_SIZE(1, 16), + REPORT_COUNT(1, 1), + OUTPUT(1, Data|Var|Abs), + END_COLLECTION, + }; iface->hid_haptics.features_report = haptics_features_report; iface->hid_haptics.waveform_report = haptics_waveform_report; + iface->hid_haptics.intensity_report = haptics_intensity_report; iface->hid_haptics.features.waveform_list[0] = HID_USAGE_HAPTICS_WAVEFORM_RUMBLE; iface->hid_haptics.features.waveform_list[1] = HID_USAGE_HAPTICS_WAVEFORM_BUZZ; iface->hid_haptics.features.duration_list[0] = 0; iface->hid_haptics.features.duration_list[1] = 0; iface->hid_haptics.features.waveform_cutoff_time_ms = 1000; + iface->hid_haptics.features.rumble.waveform = HID_USAGE_HAPTICS_WAVEFORM_RUMBLE; + iface->hid_haptics.features.rumble.duration = 0; + iface->hid_haptics.features.rumble.cutoff_time_ms = 1000; + iface->hid_haptics.features.buzz.waveform = HID_USAGE_HAPTICS_WAVEFORM_BUZZ; + iface->hid_haptics.features.buzz.duration = 0; + iface->hid_haptics.features.buzz.cutoff_time_ms = 1000; + + if (!hid_report_descriptor_append(desc, waveforms_template, sizeof(waveforms_template))) + return FALSE; - return hid_report_descriptor_append(desc, haptics_template, sizeof(haptics_template)); + if (!hid_report_descriptor_append(desc, haptics_template, sizeof(haptics_template))) + return FALSE; + if (!hid_report_descriptor_append(desc, haptics_template, sizeof(haptics_template))) + return FALSE; + + return TRUE; } #include "pshpack1.h" @@ -1072,7 +1137,23 @@ static void hid_device_set_output_report(struct unix_device *iface, HID_XFER_PAC struct hid_physical *physical = &iface->hid_physical; struct hid_haptics *haptics = &iface->hid_haptics; - if (packet->reportId == haptics->waveform_report) + if (packet->reportId == haptics->intensity_report) + { + struct hid_haptics_intensity *report = (struct hid_haptics_intensity *)(packet->reportBuffer + 1); + ULONG duration_ms; + + io->Information = sizeof(*report) + 1; + assert(packet->reportBufferLen == io->Information); + + if (!report->rumble_intensity && !report->buzz_intensity) + io->Status = iface->hid_vtbl->haptics_stop(iface); + else + { + duration_ms = min(haptics->features.rumble.cutoff_time_ms, haptics->features.buzz.cutoff_time_ms); + io->Status = iface->hid_vtbl->haptics_start(iface, duration_ms, report->rumble_intensity, report->buzz_intensity); + } + } + else if (packet->reportId == haptics->waveform_report) { struct hid_haptics_waveform *report = (struct hid_haptics_waveform *)(packet->reportBuffer + 1); UINT16 *rumble_intensity = haptics->waveform_intensity + HAPTICS_WAVEFORM_RUMBLE_ORDINAL; @@ -1307,6 +1388,8 @@ static void hid_device_set_feature_report(struct unix_device *iface, HID_XFER_PA assert(packet->reportBufferLen == io->Information); haptics->features.waveform_cutoff_time_ms = features->waveform_cutoff_time_ms; + haptics->features.rumble.cutoff_time_ms = features->rumble.cutoff_time_ms; + haptics->features.buzz.cutoff_time_ms = features->buzz.cutoff_time_ms; io->Status = STATUS_SUCCESS; } else diff --git a/dlls/winebus.sys/unix_private.h b/dlls/winebus.sys/unix_private.h index 553631e40fb..081e57dc53d 100644 --- a/dlls/winebus.sys/unix_private.h +++ b/dlls/winebus.sys/unix_private.h @@ -138,12 +138,23 @@ enum haptics_waveform_ordinal HAPTICS_WAVEFORM_LAST_ORDINAL = HAPTICS_WAVEFORM_BUZZ_ORDINAL, }; +#include "pshpack1.h" +struct hid_haptics_feature +{ + WORD waveform; + WORD duration; + UINT cutoff_time_ms; +}; + struct hid_haptics_features { WORD waveform_list[HAPTICS_WAVEFORM_LAST_ORDINAL - HAPTICS_WAVEFORM_FIRST_ORDINAL + 1]; WORD duration_list[HAPTICS_WAVEFORM_LAST_ORDINAL - HAPTICS_WAVEFORM_FIRST_ORDINAL + 1]; UINT waveform_cutoff_time_ms; + struct hid_haptics_feature rumble; + struct hid_haptics_feature buzz; }; +#include "poppack.h" struct hid_haptics { @@ -151,6 +162,7 @@ struct hid_haptics UINT16 waveform_intensity[HAPTICS_WAVEFORM_LAST_ORDINAL + 1]; BYTE features_report; BYTE waveform_report; + BYTE intensity_report; }; /* must match the order and number of usages in the
1
0
0
0
Rémi Bernon : windows.gaming.input: Fix IIterator_IInspectable trace messages.
by Alexandre Julliard
14 Mar '22
14 Mar '22
Module: wine Branch: master Commit: 0fb4c0519b3a1cab52d20e3dc825ab26ec4a208d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0fb4c0519b3a1cab52d20e3d…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Mar 14 10:28:15 2022 +0100 windows.gaming.input: Fix IIterator_IInspectable trace messages. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.gaming.input/vector.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/dlls/windows.gaming.input/vector.c b/dlls/windows.gaming.input/vector.c index ae83d16a384..c98c89195d1 100644 --- a/dlls/windows.gaming.input/vector.c +++ b/dlls/windows.gaming.input/vector.c @@ -104,9 +104,7 @@ static HRESULT WINAPI iterator_GetTrustLevel( IIterator_IInspectable *iface, Tru static HRESULT WINAPI iterator_get_Current( IIterator_IInspectable *iface, IInspectable **value ) { struct iterator *impl = impl_from_IIterator_IInspectable( iface ); - - FIXME("\n"); - + TRACE( "iface %p, value %p.\n", iface, value ); return IVectorView_IInspectable_GetAt( impl->view, impl->index, value ); } @@ -114,7 +112,7 @@ static HRESULT WINAPI iterator_get_HasCurrent( IIterator_IInspectable *iface, BO { struct iterator *impl = impl_from_IIterator_IInspectable( iface ); - FIXME("\n"); + TRACE( "iface %p, value %p.\n", iface, value ); *value = impl->index < impl->size; return S_OK; @@ -124,7 +122,7 @@ static HRESULT WINAPI iterator_MoveNext( IIterator_IInspectable *iface, BOOL *va { struct iterator *impl = impl_from_IIterator_IInspectable( iface ); - FIXME("\n"); + TRACE( "iface %p, value %p.\n", iface, value ); if (impl->index < impl->size) impl->index++; return IIterator_IInspectable_get_HasCurrent( iface, value ); @@ -134,9 +132,7 @@ static HRESULT WINAPI iterator_GetMany( IIterator_IInspectable *iface, UINT32 it IInspectable **items, UINT *count ) { struct iterator *impl = impl_from_IIterator_IInspectable( iface ); - - FIXME("\n"); - + TRACE( "iface %p, items_size %u, items %p, count %p.\n", iface, items_size, items, count ); return IVectorView_IInspectable_GetMany( impl->view, impl->index, items_size, items, count ); } @@ -635,7 +631,7 @@ static HRESULT WINAPI iterable_First( IIterable_IInspectable *iface, IIterator_I IVectorView_IInspectable *view; HRESULT hr; - TRACE("\n"); + TRACE( "iface %p, value %p.\n", iface, value ); if (FAILED(hr = IVector_IInspectable_GetView( &impl->IVector_IInspectable_iface, &view ))) return hr;
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
114
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
Results per page:
10
25
50
100
200