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
December 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
569 discussions
Start a n
N
ew thread
Rémi Bernon : winebus.sys: Send PID effect state reports for UDEV lnxev devices.
by Alexandre Julliard
02 Dec '21
02 Dec '21
Module: wine Branch: master Commit: b89204385b2fcfc6ba814de97b5b0a241e10a6e6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b89204385b2fcfc6ba814de9…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Dec 2 10:47:49 2021 +0100 winebus.sys: Send PID effect state reports for UDEV lnxev devices. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52062
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus_udev.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index 2ec15ecb6ad..540a4da508f 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -197,6 +197,7 @@ struct lnxev_device int haptic_effect_id; int effect_ids[256]; + LONG effect_flags; }; static inline struct lnxev_device *lnxev_impl_from_unix_device(struct unix_device *iface) @@ -719,7 +720,10 @@ static NTSTATUS build_report_descriptor(struct unix_device *iface, struct udev_d static BOOL set_report_from_event(struct unix_device *iface, struct input_event *ie) { + struct hid_effect_state *effect_state = &iface->hid_physical.effect_state; struct lnxev_device *impl = lnxev_impl_from_unix_device(iface); + ULONG effect_flags = InterlockedOr(&impl->effect_flags, 0); + unsigned int i; switch (ie->type) { @@ -750,6 +754,14 @@ static BOOL set_report_from_event(struct unix_device *iface, struct input_event case EV_REL: hid_device_set_rel_axis(iface, impl->rel_map[ie->code], ie->value); return FALSE; + case EV_FF_STATUS: + for (i = 0; i < ARRAY_SIZE(impl->effect_ids); ++i) if (impl->effect_ids[i] == ie->code) break; + if (i == ARRAY_SIZE(impl->effect_ids)) return FALSE; + + if (ie->value == FF_STATUS_PLAYING) effect_flags |= EFFECT_STATE_EFFECT_PLAYING; + hid_device_set_effect_state(iface, i, effect_flags); + bus_event_queue_input_report(&event_queue, iface, effect_state->report_buf, effect_state->report_len); + return FALSE; default: ERR("TODO: Process Report (%i, %i)\n",ie->type, ie->code); return FALSE; @@ -883,6 +895,8 @@ static NTSTATUS lnxev_device_physical_device_control(struct unix_device *iface, }; if (write(impl->base.device_fd, &ie, sizeof(ie)) == -1) WARN("write failed %d %s\n", errno, strerror(errno)); + else + InterlockedOr(&impl->effect_flags, EFFECT_STATE_ACTUATORS_ENABLED); return STATUS_SUCCESS; } case PID_USAGE_DC_DISABLE_ACTUATORS: @@ -895,6 +909,8 @@ static NTSTATUS lnxev_device_physical_device_control(struct unix_device *iface, }; if (write(impl->base.device_fd, &ie, sizeof(ie)) == -1) WARN("write failed %d %s\n", errno, strerror(errno)); + else + InterlockedAnd(&impl->effect_flags, ~EFFECT_STATE_ACTUATORS_ENABLED); return STATUS_SUCCESS; } case PID_USAGE_DC_STOP_ALL_EFFECTS: @@ -915,9 +931,11 @@ static NTSTATUS lnxev_device_physical_device_control(struct unix_device *iface, return STATUS_SUCCESS; case PID_USAGE_DC_DEVICE_PAUSE: WARN("device pause not supported\n"); + InterlockedOr(&impl->effect_flags, EFFECT_STATE_DEVICE_PAUSED); return STATUS_NOT_SUPPORTED; case PID_USAGE_DC_DEVICE_CONTINUE: WARN("device continue not supported\n"); + InterlockedAnd(&impl->effect_flags, ~EFFECT_STATE_DEVICE_PAUSED); return STATUS_NOT_SUPPORTED; }
1
0
0
0
Rémi Bernon : winebus.sys: Send PID effect state reports for SDL devices.
by Alexandre Julliard
02 Dec '21
02 Dec '21
Module: wine Branch: master Commit: 3ed121bffa3d1a4394277a532edb150c6b4bebfd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3ed121bffa3d1a4394277a53…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Dec 2 10:47:48 2021 +0100 winebus.sys: Send PID effect state reports for SDL devices. Checking for effect state updates periodically, as well as whenever the device state changes but not more than once every 10ms. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52062
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 | 62 +++++++++++++++++++++++++++++++++++++---- dlls/winebus.sys/hid.c | 8 ++++++ dlls/winebus.sys/unix_private.h | 2 ++ 3 files changed, 66 insertions(+), 6 deletions(-) diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index 254971e1185..76d90ab7912 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -78,7 +78,7 @@ MAKE_FUNCPTR(SDL_JoystickInstanceID); MAKE_FUNCPTR(SDL_JoystickName); MAKE_FUNCPTR(SDL_JoystickNumAxes); MAKE_FUNCPTR(SDL_JoystickOpen); -MAKE_FUNCPTR(SDL_WaitEvent); +MAKE_FUNCPTR(SDL_WaitEventTimeout); MAKE_FUNCPTR(SDL_JoystickNumButtons); MAKE_FUNCPTR(SDL_JoystickNumBalls); MAKE_FUNCPTR(SDL_JoystickNumHats); @@ -93,6 +93,7 @@ MAKE_FUNCPTR(SDL_GameControllerOpen); MAKE_FUNCPTR(SDL_GameControllerEventState); MAKE_FUNCPTR(SDL_HapticClose); MAKE_FUNCPTR(SDL_HapticDestroyEffect); +MAKE_FUNCPTR(SDL_HapticGetEffectStatus); MAKE_FUNCPTR(SDL_HapticNewEffect); MAKE_FUNCPTR(SDL_HapticOpenFromJoystick); MAKE_FUNCPTR(SDL_HapticPause); @@ -110,6 +111,7 @@ MAKE_FUNCPTR(SDL_JoystickIsHaptic); MAKE_FUNCPTR(SDL_GameControllerAddMapping); MAKE_FUNCPTR(SDL_RegisterEvents); MAKE_FUNCPTR(SDL_PushEvent); +MAKE_FUNCPTR(SDL_GetTicks); static int (*pSDL_JoystickRumble)(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms); static Uint16 (*pSDL_JoystickGetProduct)(SDL_Joystick * joystick); static Uint16 (*pSDL_JoystickGetProductVersion)(SDL_Joystick * joystick); @@ -136,6 +138,8 @@ struct sdl_device SDL_Haptic *sdl_haptic; int haptic_effect_id; int effect_ids[256]; + int effect_state[256]; + LONG effect_flags; }; static inline struct sdl_device *impl_from_unix_device(struct unix_device *iface) @@ -453,9 +457,11 @@ static NTSTATUS sdl_device_physical_device_control(struct unix_device *iface, US { case PID_USAGE_DC_ENABLE_ACTUATORS: pSDL_HapticSetGain(impl->sdl_haptic, 100); + InterlockedOr(&impl->effect_flags, EFFECT_STATE_ACTUATORS_ENABLED); return STATUS_SUCCESS; case PID_USAGE_DC_DISABLE_ACTUATORS: pSDL_HapticSetGain(impl->sdl_haptic, 0); + InterlockedAnd(&impl->effect_flags, ~EFFECT_STATE_ACTUATORS_ENABLED); return STATUS_SUCCESS; case PID_USAGE_DC_STOP_ALL_EFFECTS: pSDL_HapticStopAll(impl->sdl_haptic); @@ -471,9 +477,11 @@ static NTSTATUS sdl_device_physical_device_control(struct unix_device *iface, US return STATUS_SUCCESS; case PID_USAGE_DC_DEVICE_PAUSE: pSDL_HapticPause(impl->sdl_haptic); + InterlockedOr(&impl->effect_flags, EFFECT_STATE_DEVICE_PAUSED); return STATUS_SUCCESS; case PID_USAGE_DC_DEVICE_CONTINUE: pSDL_HapticUnpause(impl->sdl_haptic); + InterlockedAnd(&impl->effect_flags, ~EFFECT_STATE_DEVICE_PAUSED); return STATUS_SUCCESS; } @@ -686,6 +694,42 @@ static const struct hid_device_vtbl sdl_device_vtbl = sdl_device_physical_effect_update, }; +static void check_device_effects_state(struct sdl_device *impl) +{ + struct unix_device *iface = &impl->unix_device; + struct hid_effect_state *effect_state = &iface->hid_physical.effect_state; + ULONG effect_flags = InterlockedOr(&impl->effect_flags, 0); + unsigned int i, ret; + + if (!impl->sdl_haptic) return; + if (!(impl->effect_support & SDL_HAPTIC_STATUS)) return; + + for (i = 0; i < ARRAY_SIZE(impl->effect_ids); ++i) + { + if (impl->effect_ids[i] == -1) continue; + ret = pSDL_HapticGetEffectStatus(impl->sdl_haptic, impl->effect_ids[i]); + if (impl->effect_state[i] == ret) continue; + impl->effect_state[i] = ret; + hid_device_set_effect_state(iface, i, effect_flags | (ret == 1 ? EFFECT_STATE_EFFECT_PLAYING : 0)); + bus_event_queue_input_report(&event_queue, iface, effect_state->report_buf, effect_state->report_len); + } +} + +static void check_all_devices_effects_state(void) +{ + static UINT last_ticks = 0; + UINT ticks = pSDL_GetTicks(); + struct sdl_device *impl; + + if (ticks - last_ticks < 10) return; + last_ticks = ticks; + + pthread_mutex_lock(&sdl_cs); + LIST_FOR_EACH_ENTRY(impl, &device_list, struct sdl_device, unix_device.entry) + check_device_effects_state(impl); + pthread_mutex_unlock(&sdl_cs); +} + static BOOL set_report_from_joystick_event(struct sdl_device *impl, SDL_Event *event) { struct unix_device *iface = &impl->unix_device; @@ -693,7 +737,7 @@ static BOOL set_report_from_joystick_event(struct sdl_device *impl, SDL_Event *e if (impl->sdl_controller) return TRUE; /* use controller events instead */ - switch(event->type) + switch (event->type) { case SDL_JOYBUTTONDOWN: case SDL_JOYBUTTONUP: @@ -732,6 +776,8 @@ static BOOL set_report_from_joystick_event(struct sdl_device *impl, SDL_Event *e default: ERR("TODO: Process Report (0x%x)\n",event->type); } + + check_device_effects_state(impl); return FALSE; } @@ -740,7 +786,7 @@ static BOOL set_report_from_controller_event(struct sdl_device *impl, SDL_Event struct unix_device *iface = &impl->unix_device; struct hid_device_state *state = &iface->hid_device_state; - switch(event->type) + switch (event->type) { case SDL_CONTROLLERBUTTONDOWN: case SDL_CONTROLLERBUTTONUP: @@ -786,6 +832,8 @@ static BOOL set_report_from_controller_event(struct sdl_device *impl, SDL_Event default: ERR("TODO: Process Report (%x)\n",event->type); } + + check_device_effects_state(impl); return FALSE; } @@ -924,7 +972,7 @@ NTSTATUS sdl_bus_init(void *args) LOAD_FUNCPTR(SDL_JoystickName); LOAD_FUNCPTR(SDL_JoystickNumAxes); LOAD_FUNCPTR(SDL_JoystickOpen); - LOAD_FUNCPTR(SDL_WaitEvent); + LOAD_FUNCPTR(SDL_WaitEventTimeout); LOAD_FUNCPTR(SDL_JoystickNumButtons); LOAD_FUNCPTR(SDL_JoystickNumBalls); LOAD_FUNCPTR(SDL_JoystickNumHats); @@ -939,6 +987,7 @@ NTSTATUS sdl_bus_init(void *args) LOAD_FUNCPTR(SDL_GameControllerEventState); LOAD_FUNCPTR(SDL_HapticClose); LOAD_FUNCPTR(SDL_HapticDestroyEffect); + LOAD_FUNCPTR(SDL_HapticGetEffectStatus); LOAD_FUNCPTR(SDL_HapticNewEffect); LOAD_FUNCPTR(SDL_HapticOpenFromJoystick); LOAD_FUNCPTR(SDL_HapticPause); @@ -956,6 +1005,7 @@ NTSTATUS sdl_bus_init(void *args) LOAD_FUNCPTR(SDL_GameControllerAddMapping); LOAD_FUNCPTR(SDL_RegisterEvents); LOAD_FUNCPTR(SDL_PushEvent); + LOAD_FUNCPTR(SDL_GetTicks); #undef LOAD_FUNCPTR pSDL_JoystickRumble = dlsym(sdl_handle, "SDL_JoystickRumble"); pSDL_JoystickGetProduct = dlsym(sdl_handle, "SDL_JoystickGetProduct"); @@ -1013,8 +1063,8 @@ NTSTATUS sdl_bus_wait(void *args) do { if (bus_event_queue_pop(&event_queue, result)) return STATUS_PENDING; - if (pSDL_WaitEvent(&event) != 0) process_device_event(&event); - else WARN("SDL_WaitEvent failed: %s\n", pSDL_GetError()); + if (pSDL_WaitEventTimeout(&event, 10) != 0) process_device_event(&event); + else check_all_devices_effects_state(); } while (event.type != quit_event); TRACE("SDL main loop exiting\n"); diff --git a/dlls/winebus.sys/hid.c b/dlls/winebus.sys/hid.c index 29d5debcfe2..8680f8a088c 100644 --- a/dlls/winebus.sys/hid.c +++ b/dlls/winebus.sys/hid.c @@ -1405,3 +1405,11 @@ void hid_device_drop_report(struct unix_device *iface) { iface->hid_device_state.dropped = TRUE; } + +void hid_device_set_effect_state(struct unix_device *iface, BYTE index, BYTE flags) +{ + struct hid_effect_state *state = &iface->hid_physical.effect_state; + struct pid_effect_state *report = (struct pid_effect_state *)(state->report_buf + 1); + report->index = index; + report->flags = flags; +} diff --git a/dlls/winebus.sys/unix_private.h b/dlls/winebus.sys/unix_private.h index 564fec9fc3a..efecf6cdbe3 100644 --- a/dlls/winebus.sys/unix_private.h +++ b/dlls/winebus.sys/unix_private.h @@ -262,6 +262,8 @@ extern BOOL hid_device_set_hatswitch_y(struct unix_device *iface, ULONG index, L extern BOOL hid_device_sync_report(struct unix_device *iface) DECLSPEC_HIDDEN; extern void hid_device_drop_report(struct unix_device *iface) DECLSPEC_HIDDEN; +extern void hid_device_set_effect_state(struct unix_device *iface, BYTE index, BYTE flags) DECLSPEC_HIDDEN; + BOOL is_xbox_gamepad(WORD vid, WORD pid) DECLSPEC_HIDDEN; BOOL is_dualshock4_gamepad(WORD vid, WORD pid) DECLSPEC_HIDDEN;
1
0
0
0
Rémi Bernon : dinput: Fully implement GetForceFeedbackState / GetEffectStatus.
by Alexandre Julliard
02 Dec '21
02 Dec '21
Module: wine Branch: master Commit: 4604b11c25ea44b08a7e9b13c1e6db3c16eba315 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4604b11c25ea44b08a7e9b13…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Dec 2 10:47:47 2021 +0100 dinput: Fully implement GetForceFeedbackState / GetEffectStatus. Using the PID effect state reports. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52062
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/device.c | 2 +- dlls/dinput/joystick_hid.c | 49 +++++++++++++++++++++++++++++++++++++++++++--- dlls/dinput8/tests/hid.c | 7 ------- 3 files changed, 47 insertions(+), 11 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index cca7f796fdc..1dc3c311f2b 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -1765,7 +1765,7 @@ static HRESULT WINAPI dinput_device_GetForceFeedbackState( IDirectInputDevice8W struct dinput_device *impl = impl_from_IDirectInputDevice8W( iface ); HRESULT hr = DI_OK; - FIXME( "iface %p, out %p semi-stub!\n", iface, out ); + TRACE( "iface %p, out %p.\n", iface, out ); if (!out) return E_POINTER; *out = 0; diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 9dac2b3af4b..976961c3a9f 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -1052,7 +1052,11 @@ static HRESULT hid_joystick_send_force_feedback_command( IDirectInputDevice8W *i case DISFFC_SETACTUATORSOFF: usage = PID_USAGE_DC_DISABLE_ACTUATORS; break; } - if (command == DISFFC_RESET) IDirectInputDevice8_EnumCreatedEffectObjects( iface, unload_effect_object, NULL, 0 ); + if (command == DISFFC_RESET) + { + IDirectInputDevice8_EnumCreatedEffectObjects( iface, unload_effect_object, NULL, 0 ); + impl->base.force_feedback_state = DIGFFS_STOPPED | DIGFFS_EMPTY; + } count = 1; status = HidP_InitializeReportForID( HidP_Output, report->id, impl->preparsed, report_buf, report_len ); @@ -1201,10 +1205,12 @@ static HRESULT hid_joystick_read( IDirectInputDevice8W *iface ) .dwHow = DIPH_DEVICE, }; struct hid_joystick *impl = impl_from_IDirectInputDevice8W( iface ); - ULONG i, count, report_len = impl->caps.InputReportByteLength; + ULONG i, index, count, report_len = impl->caps.InputReportByteLength; DIDATAFORMAT *format = impl->base.device_format; struct parse_device_state_params params = {{0}}; char *report_buf = impl->input_report_buf; + struct hid_joystick_effect *effect; + DWORD device_state, effect_state; USAGE_AND_PAGE *usages; NTSTATUS status; HRESULT hr; @@ -1258,6 +1264,43 @@ static HRESULT hid_joystick_read( IDirectInputDevice8W *iface ) if (impl->base.hEvent && memcmp( ¶ms.old_state, impl->base.device_state, format->dwDataSize )) SetEvent( impl->base.hEvent ); } + else if (report_buf[0] == impl->pid_effect_state.id) + { + status = HidP_GetUsageValue( HidP_Input, HID_USAGE_PAGE_PID, 0, PID_USAGE_EFFECT_BLOCK_INDEX, + &index, impl->preparsed, report_buf, report_len ); + if (status != HIDP_STATUS_SUCCESS) WARN( "HidP_GetUsageValue EFFECT_BLOCK_INDEX returned %#x\n", status ); + + EnterCriticalSection( &impl->base.crit ); + effect_state = 0; + device_state = impl->base.force_feedback_state & DIGFFS_EMPTY; + while (count--) + { + USAGE_AND_PAGE *button = impl->usages_buf + count; + if (button->UsagePage != HID_USAGE_PAGE_PID) + FIXME( "unimplemented usage page %#04x.\n", button->UsagePage ); + else switch (button->Usage) + { + case PID_USAGE_DEVICE_PAUSED: device_state |= DIGFFS_PAUSED; break; + case PID_USAGE_ACTUATORS_ENABLED: device_state |= DIGFFS_ACTUATORSON; break; + case PID_USAGE_SAFETY_SWITCH: device_state |= DIGFFS_SAFETYSWITCHON; break; + case PID_USAGE_ACTUATOR_OVERRIDE_SWITCH: device_state |= DIGFFS_USERFFSWITCHON; break; + case PID_USAGE_ACTUATOR_POWER: device_state |= DIGFFS_POWERON; break; + case PID_USAGE_EFFECT_PLAYING: effect_state = DIEGES_PLAYING; break; + default: FIXME( "unimplemented usage %#04x\n", button->Usage ); break; + } + } + if (!(device_state & DIGFFS_ACTUATORSON)) device_state |= DIGFFS_ACTUATORSOFF; + if (!(device_state & DIGFFS_SAFETYSWITCHON)) device_state |= DIGFFS_SAFETYSWITCHOFF; + if (!(device_state & DIGFFS_USERFFSWITCHON)) device_state |= DIGFFS_USERFFSWITCHOFF; + if (!(device_state & DIGFFS_POWERON)) device_state |= DIGFFS_POWEROFF; + + TRACE( "effect %u state %#x, device state %#x\n", index, effect_state, device_state ); + + LIST_FOR_EACH_ENTRY( effect, &impl->effect_list, struct hid_joystick_effect, entry ) + if (effect->index == index) effect->status = effect_state; + impl->base.force_feedback_state = device_state; + LeaveCriticalSection( &impl->base.crit ); + } memset( &impl->read_ovl, 0, sizeof(impl->read_ovl) ); impl->read_ovl.hEvent = impl->base.read_event; @@ -2722,7 +2765,7 @@ static HRESULT WINAPI hid_joystick_effect_GetEffectStatus( IDirectInputEffect *i struct hid_joystick_effect *impl = impl_from_IDirectInputEffect( iface ); HRESULT hr = DI_OK; - FIXME( "iface %p, status %p semi-stub!\n", iface, status ); + TRACE( "iface %p, status %p.\n", iface, status ); if (!status) return E_POINTER; *status = 0; diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index 2efa817f00e..0a58f215ea9 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -9243,7 +9243,6 @@ static void test_device_managed_effect(void) hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_PAUSED|DIGFFS_EMPTY|DIGFFS_ACTUATORSON|DIGFFS_POWERON|DIGFFS_SAFETYSWITCHON|DIGFFS_USERFFSWITCHON; - todo_wine ok( res == flags, "got state %#x\n", res ); set_hid_expect( file, NULL, 0 ); @@ -9450,7 +9449,6 @@ static void test_device_managed_effect(void) hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_PAUSED|DIGFFS_ACTUATORSON|DIGFFS_POWERON|DIGFFS_SAFETYSWITCHON|DIGFFS_USERFFSWITCHON; - todo_wine ok( res == flags, "got state %#x\n", res ); set_hid_expect( file, NULL, 0 ); @@ -9460,14 +9458,12 @@ static void test_device_managed_effect(void) res = 0xdeadbeef; hr = IDirectInputEffect_GetEffectStatus( effect, &res ); ok( hr == DI_OK, "GetEffectStatus returned %#x\n", hr ); - todo_wine ok( res == DIEGES_PLAYING, "got status %#x\n", res ); set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); res = 0xdeadbeef; hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_ACTUATORSOFF|DIGFFS_POWEROFF|DIGFFS_SAFETYSWITCHOFF|DIGFFS_USERFFSWITCHOFF; - todo_wine ok( res == flags, "got state %#x\n", res ); set_hid_expect( file, NULL, 0 ); @@ -9483,7 +9479,6 @@ static void test_device_managed_effect(void) hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_PAUSED|DIGFFS_ACTUATORSON|DIGFFS_POWEROFF|DIGFFS_SAFETYSWITCHOFF|DIGFFS_USERFFSWITCHOFF; - todo_wine ok( res == flags, "got state %#x\n", res ); set_hid_expect( file, NULL, 0 ); @@ -9501,7 +9496,6 @@ static void test_device_managed_effect(void) hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_PAUSED|DIGFFS_ACTUATORSON|DIGFFS_POWEROFF|DIGFFS_SAFETYSWITCHOFF|DIGFFS_USERFFSWITCHOFF; - todo_wine ok( res == flags, "got state %#x\n", res ); set_hid_expect( file, NULL, 0 ); @@ -9519,7 +9513,6 @@ static void test_device_managed_effect(void) hr = IDirectInputDevice8_GetForceFeedbackState( device, &res ); ok( hr == DI_OK, "GetForceFeedbackState returned %#x\n", hr ); flags = DIGFFS_EMPTY|DIGFFS_PAUSED|DIGFFS_ACTUATORSON|DIGFFS_POWEROFF|DIGFFS_SAFETYSWITCHOFF|DIGFFS_USERFFSWITCHOFF; - todo_wine ok( res == flags, "got state %#x\n", res ); set_hid_expect( file, NULL, 0 );
1
0
0
0
Rémi Bernon : dinput: Look for the PID effect state input report.
by Alexandre Julliard
02 Dec '21
02 Dec '21
Module: wine Branch: master Commit: f6fa99bd4e63940b540a23555f10ebbbc709c752 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f6fa99bd4e63940b540a2355…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Dec 2 10:47:46 2021 +0100 dinput: Look for the PID effect state input report. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52062
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/joystick_hid.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 49a8f28e864..9dac2b3af4b 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -159,6 +159,12 @@ struct pid_new_effect ULONG type_coll; }; +struct pid_effect_state +{ + BYTE id; + ULONG collection; +}; + struct hid_joystick { struct dinput_device base; @@ -193,6 +199,7 @@ struct hid_joystick struct pid_block_free pid_block_free; struct pid_block_load pid_block_load; struct pid_new_effect pid_new_effect; + struct pid_effect_state pid_effect_state; }; static inline struct hid_joystick *impl_from_IDirectInputDevice8W( IDirectInputDevice8W *iface ) @@ -535,12 +542,7 @@ static BOOL enum_objects( struct hid_joystick *impl, const DIPROPHEADER *filter, if (!caps->usage_page) continue; if (caps->flags & HID_VALUE_CAPS_IS_BUTTON) continue; - if (caps->usage_page == HID_USAGE_PAGE_PID) - { - value_ofs += (caps->usage_max - caps->usage_min + 1) * sizeof(LONG); - object += caps->usage_max - caps->usage_min + 1; - } - else if (caps->usage_page >= HID_USAGE_PAGE_VENDOR_DEFINED_BEGIN) + if (caps->usage_page >= HID_USAGE_PAGE_VENDOR_DEFINED_BEGIN) value_ofs += (caps->usage_max - caps->usage_min + 1) * sizeof(LONG); else for (j = caps->usage_min; j <= caps->usage_max; ++j) { @@ -613,12 +615,7 @@ static BOOL enum_objects( struct hid_joystick *impl, const DIPROPHEADER *filter, if (!caps->usage_page) continue; if (!(caps->flags & HID_VALUE_CAPS_IS_BUTTON)) continue; - if (caps->usage_page == HID_USAGE_PAGE_PID) - { - button_ofs += caps->usage_max - caps->usage_min + 1; - object += caps->usage_max - caps->usage_min + 1; - } - else if (caps->usage_page >= HID_USAGE_PAGE_VENDOR_DEFINED_BEGIN) + if (caps->usage_page >= HID_USAGE_PAGE_VENDOR_DEFINED_BEGIN) button_ofs += caps->usage_max - caps->usage_min + 1; else for (j = caps->usage_min; j <= caps->usage_max; ++j) { @@ -1290,6 +1287,8 @@ static BOOL enum_objects_callback( struct hid_joystick *impl, struct hid_value_c DIDEVICEOBJECTINSTANCEW *instance, void *data ) { struct enum_objects_params *params = data; + if (instance->wUsagePage == HID_USAGE_PAGE_PID && !(instance->dwType & DIDFT_NODATA)) + return DIENUM_CONTINUE; return params->callback( instance, params->context ); } @@ -1605,6 +1604,7 @@ static BOOL init_pid_reports( struct hid_joystick *impl, struct hid_value_caps * struct pid_block_free *block_free = &impl->pid_block_free; struct pid_block_load *block_load = &impl->pid_block_load; struct pid_new_effect *new_effect = &impl->pid_new_effect; + struct pid_effect_state *effect_state = &impl->pid_effect_state; #define SET_COLLECTION( rep ) \ do \ @@ -1640,6 +1640,7 @@ static BOOL init_pid_reports( struct hid_joystick *impl, struct hid_value_caps * case PID_USAGE_BLOCK_FREE_REPORT: SET_COLLECTION( block_free ); break; case PID_USAGE_BLOCK_LOAD_REPORT: SET_COLLECTION( block_load ); break; case PID_USAGE_CREATE_NEW_EFFECT_REPORT: SET_COLLECTION( new_effect ); break; + case PID_USAGE_STATE_REPORT: SET_COLLECTION( effect_state ); break; case PID_USAGE_DEVICE_CONTROL: SET_SUB_COLLECTION( device_control, control_coll ); break; case PID_USAGE_EFFECT_OPERATION: SET_SUB_COLLECTION( effect_control, control_coll ); break; @@ -1677,8 +1678,7 @@ static BOOL init_pid_caps( struct hid_joystick *impl, struct hid_value_caps *cap struct pid_block_free *block_free = &impl->pid_block_free; struct pid_block_load *block_load = &impl->pid_block_load; struct pid_new_effect *new_effect = &impl->pid_new_effect; - - if (!(instance->dwType & DIDFT_OUTPUT)) return DIENUM_CONTINUE; + struct pid_effect_state *effect_state = &impl->pid_effect_state; #define SET_REPORT_ID( rep ) \ do \ @@ -1689,6 +1689,11 @@ static BOOL init_pid_caps( struct hid_joystick *impl, struct hid_value_caps *cap FIXME( "multiple " #rep " report ids!\n" ); \ } while (0) + if (instance->wCollectionNumber == effect_state->collection) + SET_REPORT_ID( effect_state ); + + if (!(instance->dwType & DIDFT_OUTPUT)) return DIENUM_CONTINUE; + if (instance->wCollectionNumber == device_control->control_coll) SET_REPORT_ID( device_control ); if (instance->wCollectionNumber == effect_control->control_coll) @@ -1956,7 +1961,7 @@ HRESULT hid_joystick_create_device( IDirectInputImpl *dinput, const GUID *guid, impl->usages_buf = usages; enum_objects( impl, &filter, DIDFT_COLLECTION, init_pid_reports, NULL ); - enum_objects( impl, &filter, DIDFT_NODATA, init_pid_caps, NULL ); + enum_objects( impl, &filter, DIDFT_NODATA | DIDFT_BUTTON | DIDFT_AXIS, init_pid_caps, NULL ); TRACE( "device control id %u, coll %u, control coll %u\n", impl->pid_device_control.id, impl->pid_device_control.collection, impl->pid_device_control.control_coll ); @@ -1976,6 +1981,7 @@ HRESULT hid_joystick_create_device( IDirectInputImpl *dinput, const GUID *guid, impl->pid_block_load.collection, impl->pid_block_load.status_coll ); TRACE( "create new effect id %u, coll %u, type_coll %u\n", impl->pid_new_effect.id, impl->pid_new_effect.collection, impl->pid_new_effect.type_coll ); + TRACE( "effect state id %u, coll %u\n", impl->pid_effect_state.id, impl->pid_effect_state.collection ); if (impl->pid_device_control.id) {
1
0
0
0
Rémi Bernon : winebus.sys: Add a PID effect state input report.
by Alexandre Julliard
02 Dec '21
02 Dec '21
Module: wine Branch: master Commit: c42933f5ecd580d301e334ece0ddde6465409a0f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c42933f5ecd580d301e334ec…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Dec 2 10:47:45 2021 +0100 winebus.sys: Add a PID effect state input report. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52062
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/hid.c | 42 +++++++++++++++++++++++++++++++++++++++++ dlls/winebus.sys/unix_private.h | 18 ++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/dlls/winebus.sys/hid.c b/dlls/winebus.sys/hid.c index beb2ebe8ad9..29d5debcfe2 100644 --- a/dlls/winebus.sys/hid.c +++ b/dlls/winebus.sys/hid.c @@ -475,6 +475,12 @@ struct pid_set_ramp_force INT16 ramp_start; INT16 ramp_end; }; + +struct pid_effect_state +{ + BYTE flags; + BYTE index; +}; #include "poppack.h" static BOOL hid_descriptor_add_set_periodic(struct unix_device *iface) @@ -883,6 +889,33 @@ BOOL hid_device_add_physical(struct unix_device *iface, USAGE *usages, USHORT co UNIT(1, 0), /* None */ END_COLLECTION, }; + + const BYTE effect_state_report = ++desc->next_report_id[HidP_Input]; + const BYTE effect_state_template[] = + { + /* Report effect state */ + USAGE(1, PID_USAGE_STATE_REPORT), + COLLECTION(1, Logical), + REPORT_ID(1, effect_state_report), + + USAGE(1, PID_USAGE_DEVICE_PAUSED), + USAGE(1, PID_USAGE_ACTUATORS_ENABLED), + USAGE(1, PID_USAGE_EFFECT_PLAYING), + LOGICAL_MINIMUM(1, 0), + LOGICAL_MAXIMUM(1, 1), + REPORT_SIZE(1, 1), + REPORT_COUNT(1, 8), + INPUT(1, Data|Var|Abs), + + USAGE(1, PID_USAGE_EFFECT_BLOCK_INDEX), + LOGICAL_MINIMUM(1, 0), + LOGICAL_MAXIMUM(1, 0x7f), + REPORT_SIZE(1, 8), + REPORT_COUNT(1, 1), + INPUT(1, Data|Var|Abs), + END_COLLECTION, + }; + struct hid_effect_state *effect_state = &iface->hid_physical.effect_state; BOOL periodic = FALSE; BOOL envelope = FALSE; BOOL condition = FALSE; @@ -953,6 +986,9 @@ BOOL hid_device_add_physical(struct unix_device *iface, USAGE *usages, USHORT co if (ramp_force && !hid_descriptor_add_set_ramp_force(iface)) return FALSE; + if (!hid_report_descriptor_append(desc, effect_state_template, sizeof(effect_state_template))) + return FALSE; + /* HID nary collection indexes start at 1 */ memcpy(iface->hid_physical.effect_types + 1, usages, count * sizeof(*usages)); @@ -960,6 +996,12 @@ BOOL hid_device_add_physical(struct unix_device *iface, USAGE *usages, USHORT co iface->hid_physical.device_gain_report = device_gain_report; iface->hid_physical.effect_control_report = effect_control_report; iface->hid_physical.effect_update_report = effect_update_report; + + effect_state->id = effect_state_report; + effect_state->report_len = sizeof(struct pid_effect_state) + 1; + if (!(effect_state->report_buf = calloc(1, effect_state->report_len))) return FALSE; + effect_state->report_buf[0] = effect_state->id; + return TRUE; } diff --git a/dlls/winebus.sys/unix_private.h b/dlls/winebus.sys/unix_private.h index 10784652a2b..564fec9fc3a 100644 --- a/dlls/winebus.sys/unix_private.h +++ b/dlls/winebus.sys/unix_private.h @@ -151,6 +151,22 @@ struct hid_haptics BYTE waveform_report; }; +/* must match the order and number of usages in the + * PID_USAGE_STATE_REPORT report */ +enum effect_state_flags +{ + EFFECT_STATE_DEVICE_PAUSED = 0x01, + EFFECT_STATE_ACTUATORS_ENABLED = 0x02, + EFFECT_STATE_EFFECT_PLAYING = 0x04, +}; + +struct hid_effect_state +{ + USHORT report_len; + BYTE *report_buf; + BYTE id; +}; + struct hid_physical { USAGE effect_types[32]; @@ -165,6 +181,8 @@ struct hid_physical BYTE set_condition_report; BYTE set_constant_force_report; BYTE set_ramp_force_report; + + struct hid_effect_state effect_state; }; struct hid_device_state
1
0
0
0
Rémi Bernon : hidclass.sys: Only drop input reports when length is too short.
by Alexandre Julliard
02 Dec '21
02 Dec '21
Module: wine Branch: master Commit: c2f473d6c413e05cd1760c5c712170594a9700ee URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c2f473d6c413e05cd1760c5c…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Dec 2 10:47:44 2021 +0100 hidclass.sys: Only drop input reports when length is too short. And add some warnings when we do. This otherwise makes the effect state reports from the tests to be always dropped as they are shorter than the returned length, which is the read buffer size and the maximum input report length. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/hidclass.sys/device.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c index fb21e230ec4..dd288a82b67 100644 --- a/dlls/hidclass.sys/device.c +++ b/dlls/hidclass.sys/device.c @@ -322,7 +322,6 @@ static DWORD CALLBACK hid_device_thread(void *args) packet = malloc( sizeof(*packet) + desc->InputLength ); buffer = (BYTE *)(packet + 1); - packet->reportBuffer = buffer; report = find_report_with_type_and_id( ext, HidP_Input, 0, TRUE ); if (!report) WARN("no input report found.\n"); @@ -331,6 +330,7 @@ static DWORD CALLBACK hid_device_thread(void *args) do { packet->reportId = buffer[0] = report_id; + packet->reportBuffer = buffer; packet->reportBufferLen = desc->InputLength; if (!report_id) @@ -345,13 +345,17 @@ static DWORD CALLBACK hid_device_thread(void *args) if (io.Status == STATUS_SUCCESS) { if (!report_id) io.Information++; - packet->reportId = buffer[0]; - packet->reportBuffer = buffer; - packet->reportBufferLen = io.Information; - - report = find_report_with_type_and_id( ext, HidP_Input, buffer[0], FALSE ); - if (polled || (report && report->InputLength == io.Information)) + if (!(report = find_report_with_type_and_id( ext, HidP_Input, buffer[0], FALSE ))) + WARN( "dropping unknown input id %u\n", buffer[0] ); + else if (!polled && io.Information < report->InputLength) + WARN( "dropping short report, len %u expected %u\n", (ULONG)io.Information, report->InputLength ); + else + { + packet->reportId = buffer[0]; + packet->reportBuffer = buffer; + packet->reportBufferLen = io.Information; hid_device_queue_input( device, packet ); + } } res = WaitForSingleObject(ext->u.pdo.halt_event, polled ? ext->u.pdo.poll_interval : 0);
1
0
0
0
Rémi Bernon : winebus.sys: Rotate directions to match the backend conventions.
by Alexandre Julliard
02 Dec '21
02 Dec '21
Module: wine Branch: master Commit: b431dceeca9aa0d4229c3597b833bcaf04de7110 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b431dceeca9aa0d4229c3597…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Dec 2 10:47:43 2021 +0100 winebus.sys: Rotate directions to match the backend conventions. The first direction in HID PID reports seems to be in polar space, rotated by 90° compared to the spherical coordinate space used in dinput. We need to fixup the directions to match Linux FF or SDL direction coordinate space. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51922
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 | 11 ++++++++--- dlls/winebus.sys/bus_udev.c | 11 +++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index 003f6652f05..254971e1185 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -565,6 +565,7 @@ static NTSTATUS sdl_device_physical_effect_update(struct unix_device *iface, BYT struct sdl_device *impl = impl_from_unix_device(iface); int id = impl->effect_ids[index]; SDL_HapticEffect effect = {0}; + UINT16 direction; NTSTATUS status; TRACE("iface %p, index %u, params %p.\n", iface, index, params); @@ -572,6 +573,10 @@ static NTSTATUS sdl_device_physical_effect_update(struct unix_device *iface, BYT if (params->effect_type == PID_USAGE_UNDEFINED) return STATUS_SUCCESS; if ((status = set_effect_type_from_usage(&effect, params->effect_type))) return status; + /* The first direction we get from PID is in polar coordinate space, so we need to + * remove 90° to make it match SDL spherical coordinates. */ + direction = (params->direction[0] - 9000) % 36000; + switch (params->effect_type) { case PID_USAGE_ET_SINE: @@ -584,7 +589,7 @@ static NTSTATUS sdl_device_physical_effect_update(struct unix_device *iface, BYT effect.periodic.button = params->trigger_button; effect.periodic.interval = params->trigger_repeat_interval; effect.periodic.direction.type = SDL_HAPTIC_SPHERICAL; - effect.periodic.direction.dir[0] = params->direction[0]; + effect.periodic.direction.dir[0] = direction; effect.periodic.direction.dir[1] = params->direction[1]; effect.periodic.period = params->periodic.period; effect.periodic.magnitude = params->periodic.magnitude; @@ -605,7 +610,7 @@ static NTSTATUS sdl_device_physical_effect_update(struct unix_device *iface, BYT effect.condition.button = params->trigger_button; effect.condition.interval = params->trigger_repeat_interval; effect.condition.direction.type = SDL_HAPTIC_SPHERICAL; - effect.condition.direction.dir[0] = params->direction[0]; + effect.condition.direction.dir[0] = direction; effect.condition.direction.dir[1] = params->direction[1]; if (params->condition_count >= 1) { @@ -633,7 +638,7 @@ static NTSTATUS sdl_device_physical_effect_update(struct unix_device *iface, BYT effect.constant.button = params->trigger_button; effect.constant.interval = params->trigger_repeat_interval; effect.constant.direction.type = SDL_HAPTIC_SPHERICAL; - effect.constant.direction.dir[0] = params->direction[0]; + effect.constant.direction.dir[0] = direction; effect.constant.direction.dir[1] = params->direction[1]; effect.constant.level = params->constant_force.magnitude; effect.constant.attack_length = params->envelope.attack_time; diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index 521ae4192b5..2ec15ecb6ad 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -1031,8 +1031,15 @@ static NTSTATUS lnxev_device_physical_effect_update(struct unix_device *iface, B effect.replay.delay = params->start_delay; effect.trigger.button = params->trigger_button; effect.trigger.interval = params->trigger_repeat_interval; - /* only supports polar with one direction angle */ - effect.direction = params->direction[0] * 0x800 / 1125; + + /* Linux FF only supports polar direction, and uses an inverted convention compared + * to SDL or dinput (see SDL src/haptic/linux/SDL_syshaptic.c), where the force pulls + * into the specified direction, instead of coming from it. + * + * The first direction we get from PID is in polar coordinate space, so we need to + * add 180° to make it match Linux coordinates. */ + effect.direction = (params->direction[0] + 18000) % 36000; + effect.direction = effect.direction * 0x800 / 1125; switch (params->effect_type) {
1
0
0
0
Rémi Bernon : dinput8/tests: Add more effect direction tests.
by Alexandre Julliard
02 Dec '21
02 Dec '21
Module: wine Branch: master Commit: 8feeb883e13121bc592885e49f21697c1cc5c3b3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8feeb883e13121bc592885e4…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Dec 2 10:47:42 2021 +0100 dinput8/tests: Add more effect direction tests. Making sure we are actually writing the correctly values to PID reports, regardless of user provided coordinate space. 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 +++++- dlls/dinput8/tests/hid.c | 103 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+), 1 deletion(-) diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 99fe98d95ce..49a8f28e864 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -2764,6 +2764,13 @@ static void set_parameter_value_us( struct hid_joystick_effect *impl, char *repo set_parameter_value( impl, report_buf, caps, value ); } +static BOOL is_axis_usage_enabled( struct hid_joystick_effect *impl, USAGE usage ) +{ + DWORD i = impl->params.cAxes; + while (i--) if (LOWORD(impl->params.rgdwAxes[i]) == usage) return TRUE; + return FALSE; +} + static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface ) { static const DWORD complete_mask = DIEP_AXES | DIEP_DIRECTION | DIEP_TYPESPECIFICPARAMS; @@ -2937,7 +2944,12 @@ static HRESULT WINAPI hid_joystick_effect_Download( IDirectInputEffect *iface ) spherical.rglDirection = directions; convert_directions_to_spherical( &impl->params, &spherical ); - for (i = 0; i < min( effect_update->direction_count, spherical.cAxes ); ++i) + /* FIXME: as far as the test cases go, directions are only written if + * either X or Y axes are enabled, maybe need more tests though */ + if (!is_axis_usage_enabled( impl, HID_USAGE_GENERIC_X ) && + !is_axis_usage_enabled( impl, HID_USAGE_GENERIC_Y )) + WARN( "neither X or Y axes are selected, skipping direction\n" ); + else 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 d9ecf4a5dd5..2efa817f00e 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -6357,6 +6357,54 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO for (i = 1; i < 4; i++) { + struct hid_expect expect_directions[] = + { + /* set periodic */ + { + .code = IOCTL_HID_WRITE_REPORT, + .report_id = 5, + .report_len = 2, + .report_buf = {0x05,0x19}, + }, + /* set envelope */ + { + .code = IOCTL_HID_WRITE_REPORT, + .report_id = 6, + .report_len = 7, + .report_buf = {0x06,0x19,0x4c,0x02,0x00,0x04,0x00}, + }, + /* update effect */ + {0}, + /* effect control */ + { + .code = IOCTL_HID_WRITE_REPORT, + .report_id = 2, + .report_len = 4, + .report_buf = {0x02,0x01,0x03,0x00}, + }, + }; + struct hid_expect expect_spherical = + { + .code = IOCTL_HID_WRITE_REPORT, + .report_id = 3, + .report_len = 11, + .report_buf = {0x03,0x01,0x02,0x08,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,i >= 2 ? 0x55 : 0,i >= 3 ? 0x1c : 0}, + }; + struct hid_expect expect_cartesian = + { + .code = IOCTL_HID_WRITE_REPORT, + .report_id = 3, + .report_len = 11, + .report_buf = {0x03,0x01,0x02,0x08,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,i >= 2 ? 0x63 : 0,i >= 3 ? 0x1d : 0}, + }; + struct hid_expect expect_polar = + { + .code = IOCTL_HID_WRITE_REPORT, + .report_id = 3, + .report_len = 11, + .report_buf = {0x03,0x01,0x02,0x08,0x01,0x00,version >= 0x700 ? 0x06 : 0x00,0x00,0x01,i >= 2 ? 0x3f : 0,i >= 3 ? 0x00 : 0}, + }; + winetest_push_context( "%u axes", i ); hr = IDirectInputDevice8_CreateEffect( device, &GUID_Sine, NULL, &effect, NULL ); ok( hr == DI_OK, "CreateEffect returned %#x\n", hr ); @@ -6465,6 +6513,61 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file, DWO ref = IDirectInputEffect_Release( effect ); ok( ref == 0, "Release returned %d\n", ref ); + + desc = expect_desc; + desc.dwFlags = DIEFF_SPHERICAL | DIEFF_OBJECTIDS; + desc.cAxes = i; + desc.rgdwAxes = axes; + desc.rglDirection = directions; + desc.rglDirection[0] = 3000; + desc.rglDirection[1] = 4000; + desc.rglDirection[2] = 5000; + flags = version >= 0x700 ? DIEP_ALLPARAMS : DIEP_ALLPARAMS_DX5; + expect_directions[2] = expect_spherical; + set_hid_expect( file, expect_directions, sizeof(expect_directions) ); + hr = IDirectInputDevice8_CreateEffect( device, &GUID_Sine, &desc, &effect, NULL ); + ok( hr == DI_OK, "CreateEffect returned %#x\n", hr ); + ref = IDirectInputEffect_Release( effect ); + ok( ref == 0, "Release returned %d\n", ref ); + set_hid_expect( file, NULL, 0 ); + + desc = expect_desc; + desc.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTIDS; + desc.cAxes = i; + desc.rgdwAxes = axes; + desc.rglDirection = directions; + desc.rglDirection[0] = 6000; + desc.rglDirection[1] = 7000; + desc.rglDirection[2] = 8000; + flags = version >= 0x700 ? DIEP_ALLPARAMS : DIEP_ALLPARAMS_DX5; + expect_directions[2] = expect_cartesian; + set_hid_expect( file, expect_directions, sizeof(expect_directions) ); + hr = IDirectInputDevice8_CreateEffect( device, &GUID_Sine, &desc, &effect, NULL ); + ok( hr == DI_OK, "CreateEffect returned %#x\n", hr ); + ref = IDirectInputEffect_Release( effect ); + ok( ref == 0, "Release returned %d\n", ref ); + set_hid_expect( file, NULL, 0 ); + + if (i == 2) + { + desc = expect_desc; + desc.dwFlags = DIEFF_POLAR | DIEFF_OBJECTIDS; + desc.cAxes = i; + desc.rgdwAxes = axes; + desc.rglDirection = directions; + desc.rglDirection[0] = 9000; + desc.rglDirection[1] = 10000; + desc.rglDirection[2] = 11000; + flags = version >= 0x700 ? DIEP_ALLPARAMS : DIEP_ALLPARAMS_DX5; + expect_directions[2] = expect_polar; + set_hid_expect( file, expect_directions, sizeof(expect_directions) ); + hr = IDirectInputDevice8_CreateEffect( device, &GUID_Sine, &desc, &effect, NULL ); + ok( hr == DI_OK, "CreateEffect returned %#x\n", hr ); + ref = IDirectInputEffect_Release( effect ); + ok( ref == 0, "Release returned %d\n", ref ); + set_hid_expect( file, NULL, 0 ); + } + winetest_pop_context(); }
1
0
0
0
Zebediah Figura : configure: Try to detect MinGW libmpg123 using pkg-config if --with-system-dllpath is specified.
by Alexandre Julliard
02 Dec '21
02 Dec '21
Module: wine Branch: master Commit: 3869f5e6b1a10694dc66f3e473cabd4288c2be08 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3869f5e6b1a10694dc66f3e4…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Dec 1 15:03:42 2021 -0600 configure: Try to detect MinGW libmpg123 using pkg-config if --with-system-dllpath is specified. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 9 +++++ 2 files changed, 119 insertions(+) diff --git a/configure b/configure index 9a6a1aa868a..5948756e7ae 100755 --- a/configure +++ b/configure @@ -12684,6 +12684,116 @@ CPPFLAGS=$ac_save_CPPFLAGS as_fn_append wine_notices "|liblcms2 ${notice_platform}MinGW development files not found; using bundled version." fi + if ${MPG123_PE_CFLAGS:+false} : +then : + if test ${MINGW_PKG_CONFIG+y} +then : + MPG123_PE_CFLAGS=`$MINGW_PKG_CONFIG --cflags libmpg123 2>/dev/null` +fi +fi +if ${MPG123_PE_LIBS:+false} : +then : + if test ${MINGW_PKG_CONFIG+y} +then : + MPG123_PE_LIBS=`$MINGW_PKG_CONFIG --libs libmpg123 2>/dev/null` +fi +fi +MPG123_PE_LIBS=${MPG123_PE_LIBS:-"-lmpg123"} +ac_save_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$CPPFLAGS $MPG123_PE_CFLAGS" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MinGW mpg123.h" >&5 +printf %s "checking for MinGW mpg123.h... " >&6; } +if test ${ac_cv_mingw_header_mpg123_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_wine_check_headers_saved_cc=$CC +ac_wine_check_headers_saved_exeext=$ac_exeext +CC="$CROSSCC" +ac_exeext=".exe" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <mpg123.h> +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_mingw_header_mpg123_h=yes +else $as_nop + ac_cv_mingw_header_mpg123_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +CC=$ac_wine_check_headers_saved_cc +ac_exeext=$ac_wine_check_headers_saved_exeext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mingw_header_mpg123_h" >&5 +printf "%s\n" "$ac_cv_mingw_header_mpg123_h" >&6; } +if test "x$ac_cv_mingw_header_mpg123_h" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mpg123_feed in MinGW -lmpg123" >&5 +printf %s "checking for mpg123_feed in MinGW -lmpg123... " >&6; } +if test ${ac_cv_mingw_lib_mpg123+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_wine_check_headers_saved_cc=$CC +ac_wine_check_headers_saved_exeext=$ac_exeext +ac_wine_check_headers_saved_libs=$LIBS +CC="$CROSSCC" +ac_exeext=".exe" +LIBS="-lmpg123 $MPG123_PE_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char mpg123_feed (); +int +main (void) +{ +return mpg123_feed (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_mingw_lib_mpg123=yes +else $as_nop + ac_cv_mingw_lib_mpg123=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +CC=$ac_wine_check_headers_saved_cc +ac_exeext=$ac_wine_check_headers_saved_exeext +LIBS=$ac_wine_check_headers_saved_libs +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mingw_lib_mpg123" >&5 +printf "%s\n" "$ac_cv_mingw_lib_mpg123" >&6; } +if test "x$ac_cv_mingw_lib_mpg123" = xyes +then : + : +else $as_nop + MPG123_PE_CFLAGS=""; MPG123_PE_LIBS="" +fi +else $as_nop + MPG123_PE_CFLAGS=""; MPG123_PE_LIBS="" +fi +CPPFLAGS=$ac_save_CPPFLAGS + + if test "x$MPG123_PE_LIBS" = "x" + then + as_fn_append wine_notices "|libmpg123 ${notice_platform}MinGW development files not found (or too old); using bundled version." + fi + if ${ZLIB_PE_CFLAGS:+false} : then : if test ${MINGW_PKG_CONFIG+y} diff --git a/configure.ac b/configure.ac index 2a9a397ec01..2fe4b186fd6 100644 --- a/configure.ac +++ b/configure.ac @@ -1064,6 +1064,15 @@ then WINE_NOTICE([liblcms2 ${notice_platform}MinGW development files not found; using bundled version.]) fi + WINE_MINGW_PACKAGE_FLAGS(MPG123,[libmpg123],[-lmpg123], + [WINE_CHECK_MINGW_HEADER(mpg123.h, + [WINE_CHECK_MINGW_LIB(mpg123,mpg123_feed,[:],[MPG123_PE_CFLAGS=""; MPG123_PE_LIBS=""],[$MPG123_PE_LIBS])], + [MPG123_PE_CFLAGS=""; MPG123_PE_LIBS=""])]) + if test "x$MPG123_PE_LIBS" = "x" + then + WINE_NOTICE([libmpg123 ${notice_platform}MinGW development files not found (or too old); using bundled version.]) + fi + WINE_MINGW_PACKAGE_FLAGS(ZLIB,[zlib],[-lz], [WINE_CHECK_MINGW_HEADER(zlib.h, [WINE_CHECK_MINGW_LIB(z,inflate,[:],[ZLIB_PE_CFLAGS=""; ZLIB_PE_LIBS=""],[$ZLIB_PE_LIBS])],
1
0
0
0
Zebediah Figura : configure: Try to detect MinGW liblcms2 using pkg-config if --with-system-dllpath is specified.
by Alexandre Julliard
02 Dec '21
02 Dec '21
Module: wine Branch: master Commit: d0add9f8d9456d36f32f6b69013b42c959223a58 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d0add9f8d9456d36f32f6b69…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Dec 1 15:03:41 2021 -0600 configure: Try to detect MinGW liblcms2 using pkg-config if --with-system-dllpath is specified. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 9 +++++ 2 files changed, 119 insertions(+) diff --git a/configure b/configure index 1d1e9a7be6f..9a6a1aa868a 100755 --- a/configure +++ b/configure @@ -12574,6 +12574,116 @@ CPPFLAGS=$ac_save_CPPFLAGS as_fn_append wine_notices "|libjpeg ${notice_platform}MinGW development files not found; using bundled version." fi + if ${LCMS2_PE_CFLAGS:+false} : +then : + if test ${MINGW_PKG_CONFIG+y} +then : + LCMS2_PE_CFLAGS=`$MINGW_PKG_CONFIG --cflags lcms2 2>/dev/null` +fi +fi +if ${LCMS2_PE_LIBS:+false} : +then : + if test ${MINGW_PKG_CONFIG+y} +then : + LCMS2_PE_LIBS=`$MINGW_PKG_CONFIG --libs lcms2 2>/dev/null` +fi +fi +LCMS2_PE_LIBS=${LCMS2_PE_LIBS:-"-llcms2"} +ac_save_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$CPPFLAGS $LCMS2_PE_CFLAGS" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MinGW lcms2.h" >&5 +printf %s "checking for MinGW lcms2.h... " >&6; } +if test ${ac_cv_mingw_header_lcms2_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_wine_check_headers_saved_cc=$CC +ac_wine_check_headers_saved_exeext=$ac_exeext +CC="$CROSSCC" +ac_exeext=".exe" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <lcms2.h> +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_mingw_header_lcms2_h=yes +else $as_nop + ac_cv_mingw_header_lcms2_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +CC=$ac_wine_check_headers_saved_cc +ac_exeext=$ac_wine_check_headers_saved_exeext +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mingw_header_lcms2_h" >&5 +printf "%s\n" "$ac_cv_mingw_header_lcms2_h" >&6; } +if test "x$ac_cv_mingw_header_lcms2_h" = xyes +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cmsOpenProfileFromFile in MinGW -llcms2" >&5 +printf %s "checking for cmsOpenProfileFromFile in MinGW -llcms2... " >&6; } +if test ${ac_cv_mingw_lib_lcms2+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_wine_check_headers_saved_cc=$CC +ac_wine_check_headers_saved_exeext=$ac_exeext +ac_wine_check_headers_saved_libs=$LIBS +CC="$CROSSCC" +ac_exeext=".exe" +LIBS="-llcms2 $LCMS2_PE_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +char cmsOpenProfileFromFile (); +int +main (void) +{ +return cmsOpenProfileFromFile (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_mingw_lib_lcms2=yes +else $as_nop + ac_cv_mingw_lib_lcms2=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +CC=$ac_wine_check_headers_saved_cc +ac_exeext=$ac_wine_check_headers_saved_exeext +LIBS=$ac_wine_check_headers_saved_libs +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mingw_lib_lcms2" >&5 +printf "%s\n" "$ac_cv_mingw_lib_lcms2" >&6; } +if test "x$ac_cv_mingw_lib_lcms2" = xyes +then : + : +else $as_nop + LCMS2_PE_CFLAGS=""; LCMS2_PE_LIBS="" +fi +else $as_nop + LCMS2_PE_CFLAGS=""; LCMS2_PE_LIBS="" +fi +CPPFLAGS=$ac_save_CPPFLAGS + + if test "x$LCMS2_PE_LIBS" = "x" + then + as_fn_append wine_notices "|liblcms2 ${notice_platform}MinGW development files not found; using bundled version." + fi + if ${ZLIB_PE_CFLAGS:+false} : then : if test ${MINGW_PKG_CONFIG+y} diff --git a/configure.ac b/configure.ac index bd8e4495274..2a9a397ec01 100644 --- a/configure.ac +++ b/configure.ac @@ -1055,6 +1055,15 @@ then WINE_NOTICE([libjpeg ${notice_platform}MinGW development files not found; using bundled version.]) fi + WINE_MINGW_PACKAGE_FLAGS(LCMS2,[lcms2],[-llcms2], + [WINE_CHECK_MINGW_HEADER(lcms2.h, + [WINE_CHECK_MINGW_LIB(lcms2,cmsOpenProfileFromFile,[:],[LCMS2_PE_CFLAGS=""; LCMS2_PE_LIBS=""],[$LCMS2_PE_LIBS])], + [LCMS2_PE_CFLAGS=""; LCMS2_PE_LIBS=""])]) + if test "x$LCMS2_PE_LIBS" = "x" + then + WINE_NOTICE([liblcms2 ${notice_platform}MinGW development files not found; using bundled version.]) + fi + WINE_MINGW_PACKAGE_FLAGS(ZLIB,[zlib],[-lz], [WINE_CHECK_MINGW_HEADER(zlib.h, [WINE_CHECK_MINGW_LIB(z,inflate,[:],[ZLIB_PE_CFLAGS=""; ZLIB_PE_LIBS=""],[$ZLIB_PE_LIBS])],
1
0
0
0
← Newer
1
...
46
47
48
49
50
51
52
...
57
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
Results per page:
10
25
50
100
200