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
November 2021
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
951 discussions
Start a n
N
ew thread
Ivo Ivanov : dinput: Fix single-axis effects direction values.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: ddd143b0e9a77419b2a3735f78f775daa356ba71 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ddd143b0e9a77419b2a3735f…
Author: Ivo Ivanov <logos128(a)gmail.com> Date: Fri Nov 19 09:39:41 2021 +0100 dinput: Fix single-axis effects direction values. What the tests show is actually that the direction should be set only if the corresponding axis is in the axis list. Signed-off-by: Ivo Ivanov <logos128(a)gmail.com> Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/joystick_hid.c | 10 +++++----- dlls/dinput8/tests/hid.c | 48 +++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index fb83d173bda..0910c870762 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -1631,7 +1631,7 @@ static BOOL init_pid_caps( struct hid_joystick *impl, struct hid_value_caps *cap { SET_REPORT_ID( effect_update ); caps->physical_min = 0; - caps->physical_max = 36000 - 36000 / (caps->logical_max - caps->logical_min); + caps->physical_max = 35900; if (effect_update->direction_count >= 6) FIXME( "more than 6 PID directions detected\n" ); else effect_update->direction_caps[effect_update->direction_count] = caps; effect_update->direction_count++; @@ -1650,7 +1650,7 @@ static BOOL init_pid_caps( struct hid_joystick *impl, struct hid_value_caps *cap if (instance->wUsage == PID_USAGE_PHASE) { caps->physical_min = 0; - caps->physical_max = 36000 - 36000 / (caps->logical_max - caps->logical_min); + caps->physical_max = 35900; set_periodic->phase_caps = caps; } if (instance->wUsage == PID_USAGE_OFFSET) @@ -2078,11 +2078,12 @@ static void convert_directions_to_spherical( const DIEFFECT *in, DIEFFECT *out ) out->cAxes = in->cAxes; break; case DIEFF_SPHERICAL: - for (i = 0; i < in->cAxes; ++i) + for (i = 0; i < in->cAxes - 1; ++i) { out->rglDirection[i] = in->rglDirection[i] % 36000; if (out->rglDirection[i] < 0) out->rglDirection[i] += 36000; } + out->rglDirection[i] = 0; out->cAxes = in->cAxes; break; } @@ -2773,8 +2774,7 @@ static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface ) spherical.rglDirection = directions; convert_directions_to_spherical( &impl->params, &spherical ); - if (!effect_update->direction_count) WARN( "no PID effect direction caps found\n" ); - else for (i = 0; i < spherical.cAxes - 1; ++i) + for (i = 0; i < min( effect_update->direction_count, spherical.cAxes ); ++i) { tmp = directions[i] + (i == 0 ? 9000 : 0); caps = effect_update->direction_caps[effect_update->direction_count - i - 1]; diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index 9e21ccdb713..5d7416b0e4c 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -6461,10 +6461,27 @@ static void test_condition_effect( IDirectInputDevice8W *device, HANDLE file, DW .code = IOCTL_HID_WRITE_REPORT, .report_id = 3, .report_len = 11, - .report_buf = {0x03,0x01,0x03,0x08,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x00,0x00}, + .report_buf = {0x03,0x01,0x03,0x08,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x3f,0x00}, }, }; struct hid_expect expect_create_2[] = + { + /* set condition */ + { + .code = IOCTL_HID_WRITE_REPORT, + .report_id = 7, + .report_len = 8, + .report_buf = {0x07,0x00,0x4c,0x3f,0xcc,0x4c,0x33,0x19}, + }, + /* update effect */ + { + .code = IOCTL_HID_WRITE_REPORT, + .report_id = 3, + .report_len = 11, + .report_buf = {0x03,0x01,0x03,0x08,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,0x55,0xf1}, + }, + }; + struct hid_expect expect_create_3[] = { /* set condition */ { @@ -6488,10 +6505,11 @@ static void test_condition_effect( IDirectInputDevice8W *device, HANDLE file, DW .report_len = 4, .report_buf = {0x02, 0x01, 0x03, 0x00}, }; - static const DWORD expect_axes[3] = { + static const DWORD expect_axes[3] = + { + DIDFT_ABSAXIS | DIDFT_MAKEINSTANCE( 0 ) | DIDFT_FFACTUATOR, DIDFT_ABSAXIS | DIDFT_MAKEINSTANCE( 2 ) | DIDFT_FFACTUATOR, DIDFT_ABSAXIS | DIDFT_MAKEINSTANCE( 1 ) | DIDFT_FFACTUATOR, - DIDFT_ABSAXIS | DIDFT_MAKEINSTANCE( 0 ) | DIDFT_FFACTUATOR, }; static const LONG expect_directions[3] = { +3000, @@ -6642,6 +6660,10 @@ static void test_condition_effect( IDirectInputDevice8W *device, HANDLE file, DW desc = expect_desc; desc.cAxes = 3; + desc.rglDirection = directions; + desc.rglDirection[0] = +3000; + desc.rglDirection[1] = -2000; + desc.rglDirection[2] = +1000; desc.cbTypeSpecificParams = 1 * sizeof(DICONDITION); desc.lpvTypeSpecificParams = (void *)&expect_condition[1]; set_hid_expect( file, expect_create_2, sizeof(expect_create_2) ); @@ -6653,6 +6675,26 @@ static void test_condition_effect( IDirectInputDevice8W *device, HANDLE file, DW ref = IDirectInputEffect_Release( effect ); ok( ref == 0, "Release returned %d\n", ref ); set_hid_expect( file, NULL, 0 ); + + desc = expect_desc; + desc.cAxes = 2; + desc.rgdwAxes = axes; + desc.rgdwAxes[0] = DIDFT_ABSAXIS | DIDFT_MAKEINSTANCE( 1 ) | DIDFT_FFACTUATOR; + desc.rgdwAxes[1] = DIDFT_ABSAXIS | DIDFT_MAKEINSTANCE( 2 ) | DIDFT_FFACTUATOR; + desc.rglDirection = directions; + desc.rglDirection[0] = +3000; + desc.rglDirection[1] = -2000; + desc.cbTypeSpecificParams = 1 * sizeof(DICONDITION); + desc.lpvTypeSpecificParams = (void *)&expect_condition[1]; + set_hid_expect( file, expect_create_3, sizeof(expect_create_3) ); + hr = IDirectInputDevice8_CreateEffect( device, &GUID_Spring, &desc, &effect, NULL ); + ok( hr == DI_OK, "CreateEffect returned %#x\n", hr ); + set_hid_expect( file, NULL, 0 ); + + set_hid_expect( file, &expect_destroy, sizeof(expect_destroy) ); + ref = IDirectInputEffect_Release( effect ); + ok( ref == 0, "Release returned %d\n", ref ); + set_hid_expect( file, NULL, 0 ); } static void test_force_feedback_joystick( DWORD version )
1
0
0
0
Ivo Ivanov : dinput: Introduce a new set_parameter_value_angle helper.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: b8931fdce2eff4df4b6ccb85cf3ca2b80d063236 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b8931fdce2eff4df4b6ccb85…
Author: Ivo Ivanov <logos128(a)gmail.com> Date: Fri Nov 19 09:39:40 2021 +0100 dinput: Introduce a new set_parameter_value_angle helper. To correctly scale angle values and warn about unexpected units. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/joystick_hid.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 11ba9867623..fb83d173bda 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -2596,6 +2596,18 @@ static void set_parameter_value( struct hid_joystick_effect *impl, char *report_ return set_report_value( impl->joystick, report_buf, caps, value ); } +static void set_parameter_value_angle( struct hid_joystick_effect *impl, char *report_buf, + struct hid_value_caps *caps, LONG value ) +{ + LONG exp; + if (!caps) return; + exp = caps->units_exp; + if (caps->units != 0x14) WARN( "unknown angle unit caps %x\n", caps->units ); + else if (exp < -2) while (exp++ < -2) value *= 10; + else if (exp > -2) while (exp-- > -2) value /= 10; + set_parameter_value( impl, report_buf, caps, value ); +} + static void set_parameter_value_us( struct hid_joystick_effect *impl, char *report_buf, struct hid_value_caps *caps, LONG value ) { @@ -2766,7 +2778,7 @@ static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface ) { tmp = directions[i] + (i == 0 ? 9000 : 0); caps = effect_update->direction_caps[effect_update->direction_count - i - 1]; - set_parameter_value( impl, impl->effect_update_buf, caps, tmp % 36000 ); + set_parameter_value_angle( impl, impl->effect_update_buf, caps, tmp % 36000 ); } status = HidP_SetUsageValue( HidP_Output, HID_USAGE_PAGE_PID, 0, PID_USAGE_TRIGGER_BUTTON,
1
0
0
0
Rémi Bernon : winebus.sys: Avoid unnecessary scaling of effect parameter values.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: fca0f18d0857d6aee67c6ef652c31c6810292270 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fca0f18d0857d6aee67c6ef6…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Nov 19 09:39:39 2021 +0100 winebus.sys: Avoid unnecessary scaling of effect parameter values. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus_sdl.c | 24 +++---- dlls/winebus.sys/bus_udev.c | 12 ++-- dlls/winebus.sys/hid.c | 142 +++++++++++++++++++--------------------- dlls/winebus.sys/unix_private.h | 32 ++++----- dlls/winebus.sys/unixlib.c | 4 +- 5 files changed, 104 insertions(+), 110 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=fca0f18d0857d6aee67c…
1
0
0
0
Rémi Bernon : dinput: Only scale parameter value if its physical range is defined.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: ef5fa6c71608c1bd9a4f0f7a393fe88a2bab0161 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ef5fa6c71608c1bd9a4f0f7a…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Nov 19 09:39:38 2021 +0100 dinput: Only scale parameter value if its physical range is defined. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/joystick_hid.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 70c761267f7..11ba9867623 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -676,8 +676,12 @@ static void set_report_value( struct hid_joystick *impl, char *report_buf, phy_min = caps->physical_min; phy_max = caps->physical_max; - if (value > phy_max || value < phy_min) value = -1; - else value = log_min + (value - phy_min) * (log_max - log_min) / (phy_max - phy_min); + if (phy_max || phy_min) + { + if (value > phy_max || value < phy_min) value = -1; + else value = log_min + (value - phy_min) * (log_max - log_min) / (phy_max - phy_min); + } + status = HidP_SetUsageValue( HidP_Output, caps->usage_page, caps->link_collection, caps->usage_min, value, preparsed, report_buf, report_len ); if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_SetUsageValue %04x:%04x returned %#x\n",
1
0
0
0
Rémi Bernon : winebus.sys: Remove effect gain from the crafted PID reports.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: b2ba9737ad933322e7132925bb5d81fede1a6d18 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b2ba9737ad933322e7132925…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Nov 19 09:39:37 2021 +0100 winebus.sys: Remove effect gain from the crafted PID reports. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/hid.c | 8 -------- dlls/winebus.sys/unix_private.h | 1 - 2 files changed, 9 deletions(-) diff --git a/dlls/winebus.sys/hid.c b/dlls/winebus.sys/hid.c index d9523324ae1..89bc4904fac 100644 --- a/dlls/winebus.sys/hid.c +++ b/dlls/winebus.sys/hid.c @@ -440,7 +440,6 @@ struct pid_effect_update UINT16 trigger_repeat_interval; UINT16 sample_period; UINT16 start_delay; - BYTE gain; BYTE trigger_button; BYTE enable_bits; BYTE direction[2]; @@ -851,12 +850,6 @@ BOOL hid_device_add_physical(struct unix_device *iface, USAGE *usages, USHORT co UNIT_EXPONENT(1, 0), UNIT(1, 0), /* None */ - USAGE(1, PID_USAGE_GAIN), - LOGICAL_MAXIMUM(1, 0x7f), - REPORT_SIZE(1, 8), - REPORT_COUNT(1, 1), - OUTPUT(1, Data|Var|Abs), - USAGE(1, PID_USAGE_TRIGGER_BUTTON), LOGICAL_MAXIMUM(2, state->button_count), REPORT_SIZE(1, 8), @@ -1093,7 +1086,6 @@ static void hid_device_set_output_report(struct unix_device *iface, HID_XFER_PAC params->trigger_repeat_interval = report->trigger_repeat_interval; params->sample_period = report->sample_period; params->start_delay = report->start_delay; - params->gain = report->gain; params->trigger_button = report->trigger_button == 0xff ? 0 : report->trigger_button; params->axis_enabled[0] = (report->enable_bits & 1) != 0; params->axis_enabled[1] = (report->enable_bits & 2) != 0; diff --git a/dlls/winebus.sys/unix_private.h b/dlls/winebus.sys/unix_private.h index ef574e48cee..0315deca35d 100644 --- a/dlls/winebus.sys/unix_private.h +++ b/dlls/winebus.sys/unix_private.h @@ -73,7 +73,6 @@ struct effect_params UINT16 trigger_repeat_interval; UINT16 sample_period; UINT16 start_delay; - BYTE gain; BYTE trigger_button; BOOL axis_enabled[2]; BOOL direction_enabled;
1
0
0
0
Rémi Bernon : winebus.sys: Use last report length in IOCTL_HID_GET_INPUT_REPORT.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: e9c3c494fd2f388acd046c95ac6b121c0830bb46 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e9c3c494fd2f388acd046c95…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Nov 19 09:39:36 2021 +0100 winebus.sys: Use last report length in IOCTL_HID_GET_INPUT_REPORT. Instead of packet length, which may be larger than the last report buffer. Based on a patch from Ivo Ivanov <logos128(a)gmail.com>. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/main.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index c9a18313853..d805f887a6f 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -82,7 +82,7 @@ struct device_extension ULONG report_desc_length; HIDP_DEVICE_DESC collection_desc; - BYTE *last_reports[256]; + struct hid_report *last_reports[256]; struct list reports; IRP *pending_read; @@ -432,7 +432,7 @@ static void process_hid_report(DEVICE_OBJECT *device, BYTE *report_buf, DWORD re { struct device_extension *ext = (struct device_extension *)device->DeviceExtension; ULONG size = offsetof(struct hid_report, buffer[report_len]); - struct hid_report *report; + struct hid_report *report, *last_report; IRP *irp; if (!(report = RtlAllocateHeap(GetProcessHeap(), 0, size))) return; @@ -442,8 +442,11 @@ static void process_hid_report(DEVICE_OBJECT *device, BYTE *report_buf, DWORD re RtlEnterCriticalSection(&ext->cs); list_add_tail(&ext->reports, &report->entry); - if (!ext->collection_desc.ReportIDs[0].ReportID) memcpy(ext->last_reports[0], report_buf, report_len); - else memcpy(ext->last_reports[report_buf[0]], report_buf, report_len); + if (!ext->collection_desc.ReportIDs[0].ReportID) last_report = ext->last_reports[0]; + else last_report = ext->last_reports[report_buf[0]]; + + last_report->length = report_len; + memcpy(last_report->buffer, report_buf, report_len); if ((irp = pop_pending_read(ext))) { @@ -857,6 +860,7 @@ static NTSTATUS pdo_pnp_dispatch(DEVICE_OBJECT *device, IRP *irp) for (i = 0; i < ext->collection_desc.ReportIDsLength; ++i) { if (!(size = reports[i].InputLength)) continue; + size = offsetof( struct hid_report, buffer[size] ); if (!(ext->last_reports[reports[i].ReportID] = RtlAllocateHeap(GetProcessHeap(), 0, size))) status = STATUS_NO_MEMORY; } if (!status) ext->state = DEVICE_STATE_STARTED; @@ -1035,7 +1039,9 @@ static NTSTATUS WINAPI hid_internal_dispatch(DEVICE_OBJECT *device, IRP *irp) case IOCTL_HID_GET_INPUT_REPORT: { HID_XFER_PACKET *packet = (HID_XFER_PACKET *)irp->UserBuffer; - memcpy(packet->reportBuffer, ext->last_reports[packet->reportId], packet->reportBufferLen); + struct hid_report *last_report = ext->last_reports[packet->reportId]; + memcpy(packet->reportBuffer, last_report->buffer, last_report->length); + packet->reportBufferLen = last_report->length; irp->IoStatus.Information = packet->reportBufferLen; irp->IoStatus.Status = STATUS_SUCCESS; if (TRACE_ON(hid))
1
0
0
0
Ivo Ivanov : winebus.sys: Add PID_USAGE_PARAMETER_BLOCK_OFFSET in the set condition report.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: dfaf7e0490bf6dac7ecbddfc77e338da278155a1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dfaf7e0490bf6dac7ecbddfc…
Author: Ivo Ivanov <logos128(a)gmail.com> Date: Fri Nov 19 09:39:35 2021 +0100 winebus.sys: Add PID_USAGE_PARAMETER_BLOCK_OFFSET in the set condition report. Fixes improper interpretation of the condition output reports. Signed-off-by: Ivo Ivanov <logos128(a)gmail.com> Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/hid.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/winebus.sys/hid.c b/dlls/winebus.sys/hid.c index 6f22e0e81d8..d9523324ae1 100644 --- a/dlls/winebus.sys/hid.c +++ b/dlls/winebus.sys/hid.c @@ -625,6 +625,13 @@ static BOOL hid_descriptor_add_set_condition(struct unix_device *iface) REPORT_COUNT(1, 1), OUTPUT(1, Data|Var|Abs), + USAGE(1, PID_USAGE_PARAMETER_BLOCK_OFFSET), + LOGICAL_MINIMUM(1, 0x00), + LOGICAL_MAXIMUM(1, 0x01), + REPORT_SIZE(1, 8), + REPORT_COUNT(1, 1), + OUTPUT(1, Data|Var|Abs), + USAGE(1, PID_USAGE_CP_OFFSET), USAGE(1, PID_USAGE_POSITIVE_COEFFICIENT), USAGE(1, PID_USAGE_NEGATIVE_COEFFICIENT),
1
0
0
0
Zhiyi Zhang : comctl32/button: Use client rectangle as content rectangle for themed group boxes.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: 438078d045c83499ec8a62441b2b9fb14b1d4cea URL:
https://source.winehq.org/git/wine.git/?a=commit;h=438078d045c83499ec8a6244…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Fri Nov 19 15:40:07 2021 +0800 comctl32/button: Use client rectangle as content rectangle for themed group boxes. Themed group boxes always use client rectangle as content rectangle regardless of group box content margin specified by theme files. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52028
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 2e3d8912a66..d537629fa35 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -2900,7 +2900,7 @@ static void GB_ThemedPaint(HTHEME theme, const BUTTON_INFO *infoPtr, HDC hDC, in } GetClientRect(infoPtr->hwnd, &clientRect); - GetThemeBackgroundContentRect(theme, hDC, BP_GROUPBOX, state, &clientRect, &contentRect); + contentRect = clientRect; region = set_control_clipping(hDC, &clientRect); bgRect = contentRect;
1
0
0
0
Zhiyi Zhang : uxtheme: Do not overwrite system metrics when loading the same theme.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: ea71625cf177f2ad38d4520383e91a4a6152a550 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ea71625cf177f2ad38d45203…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Fri Nov 19 15:39:11 2021 +0800 uxtheme: Do not overwrite system metrics when loading the same theme. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51986
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52025
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uxtheme/system.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index bf72baccebb..37c484387ec 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -421,7 +421,7 @@ static void UXTHEME_SaveSystemMetrics(struct system_metrics *metrics, BOOL send_ */ HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf) { - BOOL ret, loaded_before = FALSE; + BOOL ret, loaded_before = FALSE, same_theme = FALSE; struct system_metrics metrics; DWORD size; HKEY hKey; @@ -430,6 +430,9 @@ HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf) if(tf) { bThemeActive = TRUE; + same_theme = !lstrcmpW(szCurrentTheme, tf->szThemeFile) + && !lstrcmpW(szCurrentColor, tf->pszSelectedColor) + && !lstrcmpW(szCurrentSize, tf->pszSelectedSize); lstrcpynW(szCurrentTheme, tf->szThemeFile, ARRAY_SIZE(szCurrentTheme)); lstrcpynW(szCurrentColor, tf->pszSelectedColor, ARRAY_SIZE(szCurrentColor)); lstrcpynW(szCurrentSize, tf->pszSelectedSize, ARRAY_SIZE(szCurrentSize)); @@ -446,6 +449,8 @@ HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf) WARN("Failed to get LoadedBefore: %d\n", GetLastError()); RegCloseKey(hKey); } + if (loaded_before && same_theme) + return MSSTYLES_SetActiveTheme(tf, FALSE); if (!loaded_before && ret) UXTHEME_SaveUnthemedSystemMetrics(&metrics);
1
0
0
0
Alexandre Julliard : makedep: Use a separate variable for cross-compiled importlib objects.
by Alexandre Julliard
19 Nov '21
19 Nov '21
Module: wine Branch: master Commit: a9e00347b70e16c3416632bf4422ab73ca8fb717 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a9e00347b70e16c3416632bf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 19 17:07:55 2021 +0100 makedep: Use a separate variable for cross-compiled importlib objects. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 104 +++++++++++++++++++++++++------------------------------- 1 file changed, 47 insertions(+), 57 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index e757efdb121..2de02aab411 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -217,7 +217,8 @@ struct makefile struct strarray c2man_files; struct strarray debug_files; struct strarray dlldata_files; - struct strarray implib_objs; + struct strarray implib_files; + struct strarray crossimplib_files; struct strarray all_targets; struct strarray phony_targets; struct strarray dependencies; @@ -495,22 +496,6 @@ static char *replace_filename( const char *path, const char *name ) } -/******************************************************************* - * strarray_replace_extension - */ -static struct strarray strarray_replace_extension( const struct strarray *array, - const char *old_ext, const char *new_ext ) -{ - unsigned int i; - struct strarray ret; - - ret.count = ret.size = array->count; - ret.str = xmalloc( sizeof(ret.str[0]) * ret.size ); - for (i = 0; i < array->count; i++) ret.str[i] = replace_extension( array->str[i], old_ext, new_ext ); - return ret; -} - - /******************************************************************* * replace_substr */ @@ -3021,13 +3006,14 @@ static void output_source_default( struct makefile *make, struct incl_file *sour if ((source->file->flags & FLAG_GENERATED) && (!make->testdll || !strendswith( source->filename, "testlist.c" ))) strarray_add( &make->clean_files, source->basename ); - if (source->file->flags & FLAG_C_IMPLIB) strarray_add( &make->implib_objs, strmake( "%s.o", obj )); if (need_obj) { if ((source->file->flags & FLAG_C_UNIX) && *dll_ext) strarray_add( &make->unixobj_files, strmake( "%s.o", obj )); - else if (!is_dll_src && !(source->file->flags & FLAG_C_IMPLIB)) + else if (source->file->flags & FLAG_C_IMPLIB) + strarray_add( &make->implib_files, strmake( "%s.o", obj )); + else if (!is_dll_src) strarray_add( &make->object_files, strmake( "%s.o", obj )); else strarray_add( &make->clean_files, strmake( "%s.o", obj )); @@ -3052,7 +3038,9 @@ static void output_source_default( struct makefile *make, struct incl_file *sour } if (need_cross) { - if (!is_dll_src && !(source->file->flags & FLAG_C_IMPLIB)) + if (source->file->flags & FLAG_C_IMPLIB) + strarray_add( &make->crossimplib_files, strmake( "%s.cross.o", obj )); + else if (!is_dll_src) strarray_add( &make->crossobj_files, strmake( "%s.cross.o", obj )); else strarray_add( &make->clean_files, strmake( "%s.cross.o", obj )); @@ -3305,54 +3293,54 @@ static void output_import_lib( struct makefile *make ) char *spec_file = src_dir_path( make, replace_extension( make->module, ".dll", ".spec" )); char *importlib_path = obj_dir_path( make, strmake( "lib%s", make->importlib )); - strarray_add( &make->clean_files, strmake( "lib%s.a", make->importlib )); - if (!*dll_ext && needs_delay_lib( make )) + strarray_add( &make->clean_files, strmake( "lib%s.a", make->importlib )); + if (!*dll_ext && needs_delay_lib( make )) + { + strarray_add( &make->clean_files, strmake( "lib%s.delay.a", make->importlib )); + output( "%s.delay.a ", importlib_path ); + } + output( "%s.a: %s %s", importlib_path, tools_path( make, "winebuild" ), spec_file ); + output_filenames_obj_dir( make, make->implib_files ); + output( "\n" ); + output( "\t%s%s -w --implib -o $@", cmd_prefix( "BUILD" ), tools_path( make, "winebuild" ) ); + output_filenames( target_flags ); + if (make->is_win16) output_filename( "-m16" ); + output_filename( "--export" ); + output_filename( spec_file ); + output_filenames_obj_dir( make, make->implib_files ); + output( "\n" ); + add_install_rule( make, make->importlib, + strmake( "lib%s.a", make->importlib ), + strmake( "d%s/lib%s.a", so_dir, make->importlib )); + + if (crosstarget) + { + strarray_add( &make->clean_files, strmake( "lib%s.cross.a", make->importlib )); + output_filename( strmake( "%s.cross.a", importlib_path )); + if (needs_delay_lib( make )) { strarray_add( &make->clean_files, strmake( "lib%s.delay.a", make->importlib )); - output( "%s.delay.a ", importlib_path ); + output_filename( strmake( "%s.delay.a", importlib_path )); } - output( "%s.a: %s %s", importlib_path, tools_path( make, "winebuild" ), spec_file ); - output_filenames_obj_dir( make, make->implib_objs ); + output( ": %s %s", tools_path( make, "winebuild" ), spec_file ); + output_filenames_obj_dir( make, make->crossimplib_files ); output( "\n" ); - output( "\t%s%s -w --implib -o $@", cmd_prefix( "BUILD" ), tools_path( make, "winebuild" ) ); - output_filenames( target_flags ); + output( "\t%s%s -b %s -w --implib -o $@", cmd_prefix( "BUILD" ), + tools_path( make, "winebuild" ), crosstarget ); if (make->is_win16) output_filename( "-m16" ); output_filename( "--export" ); output_filename( spec_file ); - output_filenames_obj_dir( make, make->implib_objs ); + output_filenames_obj_dir( make, make->crossimplib_files ); output( "\n" ); add_install_rule( make, make->importlib, - strmake( "lib%s.a", make->importlib ), - strmake( "d%s/lib%s.a", so_dir, make->importlib )); + strmake( "lib%s.cross.a", make->importlib ), + strmake( "d%s/lib%s.a", pe_dir, make->importlib )); + } + if (needs_implib_symlink( make )) + strarray_addall( &top_makefile->clean_files, output_importlib_symlinks( make )); +} - if (crosstarget) - { - struct strarray cross_files = strarray_replace_extension( &make->implib_objs, ".o", ".cross.o" ); - strarray_add( &make->clean_files, strmake( "lib%s.cross.a", make->importlib )); - output_filename( strmake( "%s.cross.a", importlib_path )); - if (needs_delay_lib( make )) - { - strarray_add( &make->clean_files, strmake( "lib%s.delay.a", make->importlib )); - output_filename( strmake( "%s.delay.a", importlib_path )); - } - output( ": %s %s", tools_path( make, "winebuild" ), spec_file ); - output_filenames_obj_dir( make, cross_files ); - output( "\n" ); - output( "\t%s%s -b %s -w --implib -o $@", cmd_prefix( "BUILD" ), - tools_path( make, "winebuild" ), crosstarget ); - if (make->is_win16) output_filename( "-m16" ); - output_filename( "--export" ); - output_filename( spec_file ); - output_filenames_obj_dir( make, cross_files ); - output( "\n" ); - add_install_rule( make, make->importlib, - strmake( "lib%s.cross.a", make->importlib ), - strmake( "d%s/lib%s.a", pe_dir, make->importlib )); - } - if (needs_implib_symlink( make )) - strarray_addall( &top_makefile->clean_files, output_importlib_symlinks( make )); - } /******************************************************************* * output_unix_lib */ @@ -3793,6 +3781,8 @@ static void output_sources( struct makefile *make ) strarray_addall( &make->clean_files, make->object_files ); strarray_addall( &make->clean_files, make->crossobj_files ); + strarray_addall( &make->clean_files, make->implib_files ); + strarray_addall( &make->clean_files, make->crossimplib_files ); strarray_addall( &make->clean_files, make->unixobj_files ); strarray_addall( &make->clean_files, make->res_files ); strarray_addall( &make->clean_files, make->pot_files );
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
96
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
Results per page:
10
25
50
100
200