winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
907 discussions
Start a n
N
ew thread
Paul Gofman : ntdll: Refactor logical processor info manipulation functions.
by Alexandre Julliard
16 May '22
16 May '22
Module: wine Branch: master Commit: 6aa437de6aa3549abd885c387ea79d18eb0eba56 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6aa437de6aa3549abd885c38…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Tue May 3 18:48:18 2022 -0500 ntdll: Refactor logical processor info manipulation functions. To reduce the diff in the next patch. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/system.c | 175 +++++++++++++++++++++++------------------------ 1 file changed, 84 insertions(+), 91 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=6aa437de6aa3549abd88…
1
0
0
0
Paul Gofman : ntdll: Move init_cpu_info() below create_logical_proc_info().
by Alexandre Julliard
16 May '22
16 May '22
Module: wine Branch: master Commit: aadc1a0a80bf7db28a1430ec4e5852ee826e9800 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aadc1a0a80bf7db28a1430ec…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Tue May 3 16:20:17 2022 -0500 ntdll: Move init_cpu_info() below create_logical_proc_info(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/system.c | 80 ++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index 64829559c1d..0710b72e42f 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -536,46 +536,6 @@ static void get_cpuinfo( SYSTEM_CPU_INFORMATION *info ) #endif /* End architecture specific feature detection for CPUs */ -/****************************************************************** - * init_cpu_info - * - * inits a couple of places with CPU related information: - * - cpu_info in this file - * - Peb->NumberOfProcessors - * - SharedUserData->ProcessFeatures[] array - */ -void init_cpu_info(void) -{ - long num; - -#ifdef _SC_NPROCESSORS_ONLN - num = sysconf(_SC_NPROCESSORS_ONLN); - if (num < 1) - { - num = 1; - WARN("Failed to detect the number of processors.\n"); - } -#elif defined(CTL_HW) && defined(HW_NCPU) - int mib[2]; - size_t len = sizeof(num); - mib[0] = CTL_HW; - mib[1] = HW_NCPU; - if (sysctl(mib, 2, &num, &len, NULL, 0) != 0) - { - num = 1; - WARN("Failed to detect the number of processors.\n"); - } -#else - num = 1; - FIXME("Detecting the number of processors is not supported.\n"); -#endif - peb->NumberOfProcessors = num; - get_cpuinfo( &cpu_info ); - TRACE( "<- CPU arch %d, level %d, rev %d, features 0x%x\n", - cpu_info.ProcessorArchitecture, cpu_info.ProcessorLevel, cpu_info.ProcessorRevision, - cpu_info.ProcessorFeatureBits ); -} - static BOOL grow_logical_proc_buf( SYSTEM_LOGICAL_PROCESSOR_INFORMATION **pdata, DWORD *max_len ) { SYSTEM_LOGICAL_PROCESSOR_INFORMATION *new_data; @@ -1254,6 +1214,46 @@ static NTSTATUS create_logical_proc_info( SYSTEM_LOGICAL_PROCESSOR_INFORMATION * } #endif +/****************************************************************** + * init_cpu_info + * + * inits a couple of places with CPU related information: + * - cpu_info in this file + * - Peb->NumberOfProcessors + * - SharedUserData->ProcessFeatures[] array + */ +void init_cpu_info(void) +{ + long num; + +#ifdef _SC_NPROCESSORS_ONLN + num = sysconf(_SC_NPROCESSORS_ONLN); + if (num < 1) + { + num = 1; + WARN("Failed to detect the number of processors.\n"); + } +#elif defined(CTL_HW) && defined(HW_NCPU) + int mib[2]; + size_t len = sizeof(num); + mib[0] = CTL_HW; + mib[1] = HW_NCPU; + if (sysctl(mib, 2, &num, &len, NULL, 0) != 0) + { + num = 1; + WARN("Failed to detect the number of processors.\n"); + } +#else + num = 1; + FIXME("Detecting the number of processors is not supported.\n"); +#endif + peb->NumberOfProcessors = num; + get_cpuinfo( &cpu_info ); + TRACE( "<- CPU arch %d, level %d, rev %d, features 0x%x\n", + cpu_info.ProcessorArchitecture, cpu_info.ProcessorLevel, cpu_info.ProcessorRevision, + cpu_info.ProcessorFeatureBits ); +} + static NTSTATUS create_cpuset_info(SYSTEM_CPU_SET_INFORMATION *info) { SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX *proc_info;
1
0
0
0
Paul Gofman : ntdll: Fix allocation size in grow_logical_proc_ex_buf().
by Alexandre Julliard
16 May '22
16 May '22
Module: wine Branch: master Commit: 6ee6076216f903a97c3686c66d076bfb39ce40f4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6ee6076216f903a97c3686c6…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Tue May 3 16:28:09 2022 -0500 ntdll: Fix allocation size in grow_logical_proc_ex_buf(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/system.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index 65c49b6ccd1..64829559c1d 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -590,8 +590,8 @@ static BOOL grow_logical_proc_ex_buf( SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX ** { SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX *new_dataex; DWORD new_len = *max_len * 2; - if (!(new_dataex = realloc( *pdataex, new_len * sizeof(*new_dataex) ))) return FALSE; - memset( new_dataex + *max_len, 0, (new_len - *max_len) * sizeof(*new_dataex) ); + if (!(new_dataex = realloc( *pdataex, new_len ))) return FALSE; + memset( (char *)new_dataex + *max_len, 0, new_len - *max_len ); *pdataex = new_dataex; *max_len = new_len; return TRUE;
1
0
0
0
Rémi Bernon : windows.gaming.input: Implement IForceFeedbackMotor_TryUnloadEffectAsync.
by Alexandre Julliard
16 May '22
16 May '22
Module: wine Branch: master Commit: ee937e8e4bd63f1fa4139438f669b2ffe1fc0b56 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ee937e8e4bd63f1fa4139438…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu May 12 10:32:30 2022 +0200 windows.gaming.input: Implement IForceFeedbackMotor_TryUnloadEffectAsync. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.gaming.input/force_feedback.c | 36 ++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/dlls/windows.gaming.input/force_feedback.c b/dlls/windows.gaming.input/force_feedback.c index 027ef459a1a..7ac69bcec1b 100644 --- a/dlls/windows.gaming.input/force_feedback.c +++ b/dlls/windows.gaming.input/force_feedback.c @@ -464,11 +464,43 @@ static HRESULT WINAPI motor_TryResetAsync( IForceFeedbackMotor *iface, IAsyncOpe return async_operation_boolean_create( (IUnknown *)iface, NULL, motor_try_reset_async, async_op ); } +static HRESULT WINAPI motor_unload_effect_async( IUnknown *iface, IUnknown *param, PROPVARIANT *result ) +{ + struct effect *effect = impl_from_IForceFeedbackEffect( (IForceFeedbackEffect *)param ); + IDirectInputEffect *dinput_effect; + HRESULT hr; + + EnterCriticalSection( &effect->cs ); + dinput_effect = effect->effect; + effect->effect = NULL; + LeaveCriticalSection( &effect->cs ); + + if (!dinput_effect) hr = S_OK; + else + { + hr = IDirectInputEffect_Unload( dinput_effect ); + IDirectInputEffect_Release( dinput_effect ); + } + + result->vt = VT_BOOL; + result->boolVal = SUCCEEDED(hr); + return hr; +} + static HRESULT WINAPI motor_TryUnloadEffectAsync( IForceFeedbackMotor *iface, IForceFeedbackEffect *effect, IAsyncOperation_boolean **async_op ) { - FIXME( "iface %p, effect %p, async_op %p stub!\n", iface, effect, async_op ); - return E_NOTIMPL; + struct effect *impl = impl_from_IForceFeedbackEffect( (IForceFeedbackEffect *)effect ); + HRESULT hr = S_OK; + + TRACE( "iface %p, effect %p, async_op %p.\n", iface, effect, async_op ); + + EnterCriticalSection( &impl->cs ); + if (!impl->effect) hr = E_FAIL; + LeaveCriticalSection( &impl->cs ); + if (FAILED(hr)) return hr; + + return async_operation_boolean_create( (IUnknown *)iface, (IUnknown *)effect, motor_unload_effect_async, async_op ); } static const struct IForceFeedbackMotorVtbl motor_vtbl =
1
0
0
0
Rémi Bernon : windows.gaming.input: Implement IForceFeedbackMotor_LoadEffectAsync.
by Alexandre Julliard
16 May '22
16 May '22
Module: wine Branch: master Commit: 7259346ab09c43b51231035651f59515779421ee URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7259346ab09c43b512310356…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu May 12 12:18:40 2022 +0200 windows.gaming.input: Implement IForceFeedbackMotor_LoadEffectAsync. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/tests/force_feedback.c | 3 - dlls/windows.gaming.input/async.c | 143 +++++++++++++++++++++++++++++ dlls/windows.gaming.input/force_feedback.c | 45 ++++++++- dlls/windows.gaming.input/private.h | 2 + 4 files changed, 187 insertions(+), 6 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=7259346ab09c43b51231…
1
0
0
0
Rémi Bernon : windows.gaming.input: Add a type parameter to force_feedback_effect_create.
by Alexandre Julliard
16 May '22
16 May '22
Module: wine Branch: master Commit: 7a82be5d977154bca942dbcd0de3ad537bda1c3f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7a82be5d977154bca942dbcd…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Apr 29 13:53:35 2022 +0200 windows.gaming.input: Add a type parameter to force_feedback_effect_create. And convert it to IDirectInputEffect type GUID. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.gaming.input/constant_effect.c | 2 +- dlls/windows.gaming.input/force_feedback.c | 28 +++++++++++++++++++++++++++- dlls/windows.gaming.input/private.h | 2 +- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/dlls/windows.gaming.input/constant_effect.c b/dlls/windows.gaming.input/constant_effect.c index ae0c0f9904d..928927144b9 100644 --- a/dlls/windows.gaming.input/constant_effect.c +++ b/dlls/windows.gaming.input/constant_effect.c @@ -205,7 +205,7 @@ static HRESULT WINAPI activation_ActivateInstance( IActivationFactory *iface, II impl->IConstantForceEffect_iface.lpVtbl = &effect_vtbl; impl->ref = 1; - if (FAILED(hr = force_feedback_effect_create( (IInspectable *)&impl->IConstantForceEffect_iface, + if (FAILED(hr = force_feedback_effect_create( WineForceFeedbackEffectType_Constant, (IInspectable *)&impl->IConstantForceEffect_iface, &impl->IWineForceFeedbackEffectImpl_inner ))) { free( impl ); diff --git a/dlls/windows.gaming.input/force_feedback.c b/dlls/windows.gaming.input/force_feedback.c index ab29a179c6a..9d3ead5fc2b 100644 --- a/dlls/windows.gaming.input/force_feedback.c +++ b/dlls/windows.gaming.input/force_feedback.c @@ -33,6 +33,12 @@ struct effect IForceFeedbackEffect IForceFeedbackEffect_iface; IInspectable *IInspectable_outer; LONG ref; + + GUID type; + DWORD axes[3]; + LONG directions[3]; + DICONSTANTFORCE constant_force; + DIEFFECT params; }; static inline struct effect *impl_from_IWineForceFeedbackEffectImpl( IWineForceFeedbackEffectImpl *iface ) @@ -143,7 +149,7 @@ static const struct IForceFeedbackEffectVtbl effect_vtbl = effect_Stop, }; -HRESULT force_feedback_effect_create( IInspectable *outer, IWineForceFeedbackEffectImpl **out ) +HRESULT force_feedback_effect_create( enum WineForceFeedbackEffectType type, IInspectable *outer, IWineForceFeedbackEffectImpl **out ) { struct effect *impl; @@ -155,6 +161,26 @@ HRESULT force_feedback_effect_create( IInspectable *outer, IWineForceFeedbackEff impl->IInspectable_outer = outer; impl->ref = 1; + switch (type) + { + case WineForceFeedbackEffectType_Constant: + impl->type = GUID_ConstantForce; + impl->params.lpvTypeSpecificParams = &impl->constant_force; + impl->params.cbTypeSpecificParams = sizeof(impl->constant_force); + break; + } + + impl->params.dwSize = sizeof(DIEFFECT); + impl->params.rgdwAxes = impl->axes; + impl->params.rglDirection = impl->directions; + impl->params.dwTriggerButton = -1; + impl->params.dwGain = 10000; + impl->params.dwFlags = DIEFF_CARTESIAN|DIEFF_OBJECTOFFSETS; + impl->params.cAxes = 0; + impl->axes[0] = DIJOFS_X; + impl->axes[1] = DIJOFS_Y; + impl->axes[2] = DIJOFS_Z; + *out = &impl->IWineForceFeedbackEffectImpl_iface; TRACE( "created ForceFeedbackEffect %p\n", *out ); return S_OK; diff --git a/dlls/windows.gaming.input/private.h b/dlls/windows.gaming.input/private.h index 58378304a26..f8edff61455 100644 --- a/dlls/windows.gaming.input/private.h +++ b/dlls/windows.gaming.input/private.h @@ -71,7 +71,7 @@ extern HRESULT event_handlers_remove( struct list *list, EventRegistrationToken extern void event_handlers_notify( struct list *list, IInspectable *element ); extern HRESULT force_feedback_motor_create( IDirectInputDevice8W *device, IForceFeedbackMotor **out ); -extern HRESULT force_feedback_effect_create( IInspectable *outer, IWineForceFeedbackEffectImpl **out ); +extern HRESULT force_feedback_effect_create( enum WineForceFeedbackEffectType type, IInspectable *outer, IWineForceFeedbackEffectImpl **out ); typedef HRESULT (WINAPI *async_operation_callback)( IUnknown *invoker, IUnknown *param, PROPVARIANT *result ); extern HRESULT async_operation_boolean_create( IUnknown *invoker, IUnknown *param, async_operation_callback callback,
1
0
0
0
Rémi Bernon : windows.gaming.input: Implement IForceFeedbackEffect interface for ConstantForceEffect.
by Alexandre Julliard
16 May '22
16 May '22
Module: wine Branch: master Commit: d5edf656efc5710a0ede1303b41ac4b869a5caeb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d5edf656efc5710a0ede1303…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Apr 27 17:45:09 2022 +0200 windows.gaming.input: Implement IForceFeedbackEffect interface for ConstantForceEffect. Using COM aggregation and a new IWineForceFeedbackEffectImpl interface, deriving from IUnknown as it is only used internally. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/tests/force_feedback.c | 3 +- dlls/windows.gaming.input/constant_effect.c | 21 ++++- dlls/windows.gaming.input/force_feedback.c | 133 ++++++++++++++++++++++++++++ dlls/windows.gaming.input/private.h | 3 + dlls/windows.gaming.input/provider.idl | 14 +++ 5 files changed, 168 insertions(+), 6 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=d5edf656efc5710a0ede…
1
0
0
0
Rémi Bernon : windows.gaming.input: Implement and instantiate ConstantForceEffect runtimeclass stubs.
by Alexandre Julliard
16 May '22
16 May '22
Module: wine Branch: master Commit: aa37aad2c894972ba1f1e6cfb932ceb63ed52450 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aa37aad2c894972ba1f1e6cf…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Apr 27 12:15:58 2022 +0200 windows.gaming.input: Implement and instantiate ConstantForceEffect runtimeclass stubs. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/tests/force_feedback.c | 3 +- dlls/windows.gaming.input/constant_effect.c | 117 +++++++++++++++++++++++++++- dlls/windows.gaming.input/private.h | 8 ++ 3 files changed, 122 insertions(+), 6 deletions(-) diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index 806212d966d..e688f575704 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -5624,15 +5624,14 @@ static void test_windows_gaming_input(void) pWindowsDeleteString( str ); hr = IActivationFactory_ActivateInstance( activation_factory, &tmp_inspectable ); - todo_wine ok( hr == S_OK, "QueryInterface returned %#lx\n", hr ); IActivationFactory_Release( activation_factory ); - if (hr != S_OK) goto skip_tests; hr = IInspectable_QueryInterface( tmp_inspectable, &IID_IForceFeedbackEffect, (void **)&effect ); todo_wine ok( hr == S_OK, "QueryInterface returned %#lx\n", hr ); IInspectable_Release( tmp_inspectable ); + if (hr != S_OK) goto skip_tests; hr = IForceFeedbackEffect_QueryInterface( effect, &IID_IConstantForceEffect, (void **)&constant_effect ); ok( hr == S_OK, "QueryInterface returned %#lx\n", hr ); diff --git a/dlls/windows.gaming.input/constant_effect.c b/dlls/windows.gaming.input/constant_effect.c index a27258dd9bf..a491d49c18c 100644 --- a/dlls/windows.gaming.input/constant_effect.c +++ b/dlls/windows.gaming.input/constant_effect.c @@ -20,10 +20,110 @@ #include "private.h" #include "provider.h" -#include "wine/debug.h" - WINE_DEFAULT_DEBUG_CHANNEL(input); +struct constant_effect +{ + IConstantForceEffect IConstantForceEffect_iface; + LONG ref; +}; + +static inline struct constant_effect *impl_from_IConstantForceEffect( IConstantForceEffect *iface ) +{ + return CONTAINING_RECORD( iface, struct constant_effect, IConstantForceEffect_iface ); +} + +static HRESULT WINAPI effect_QueryInterface( IConstantForceEffect *iface, REFIID iid, void **out ) +{ + struct constant_effect *impl = impl_from_IConstantForceEffect( iface ); + + TRACE( "iface %p, iid %s, out %p.\n", iface, debugstr_guid( iid ), out ); + + if (IsEqualGUID( iid, &IID_IUnknown ) || + IsEqualGUID( iid, &IID_IInspectable ) || + IsEqualGUID( iid, &IID_IAgileObject ) || + IsEqualGUID( iid, &IID_IConstantForceEffect )) + { + IInspectable_AddRef( (*out = &impl->IConstantForceEffect_iface) ); + return S_OK; + } + + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI effect_AddRef( IConstantForceEffect *iface ) +{ + struct constant_effect *impl = impl_from_IConstantForceEffect( iface ); + ULONG ref = InterlockedIncrement( &impl->ref ); + TRACE( "iface %p increasing refcount to %lu.\n", iface, ref ); + return ref; +} + +static ULONG WINAPI effect_Release( IConstantForceEffect *iface ) +{ + struct constant_effect *impl = impl_from_IConstantForceEffect( iface ); + ULONG ref = InterlockedDecrement( &impl->ref ); + + TRACE( "iface %p decreasing refcount to %lu.\n", iface, ref ); + + if (!ref) free( impl ); + + return ref; +} + +static HRESULT WINAPI effect_GetIids( IConstantForceEffect *iface, ULONG *iid_count, IID **iids ) +{ + FIXME( "iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids ); + return E_NOTIMPL; +} + +static HRESULT WINAPI effect_GetRuntimeClassName( IConstantForceEffect *iface, HSTRING *class_name ) +{ + return WindowsCreateString( RuntimeClass_Windows_Gaming_Input_ForceFeedback_ConstantForceEffect, + ARRAY_SIZE(RuntimeClass_Windows_Gaming_Input_ForceFeedback_ConstantForceEffect), + class_name ); +} + +static HRESULT WINAPI effect_GetTrustLevel( IConstantForceEffect *iface, TrustLevel *trust_level ) +{ + FIXME( "iface %p, trust_level %p stub!\n", iface, trust_level ); + return E_NOTIMPL; +} + +static HRESULT WINAPI effect_SetParameters( IConstantForceEffect *iface, Vector3 direction, TimeSpan duration ) +{ + FIXME( "iface %p, direction %s, duration %I64u stub!\n", iface, debugstr_vector3( &direction ), duration.Duration ); + return E_NOTIMPL; +} + +static HRESULT WINAPI effect_SetParametersWithEnvelope( IConstantForceEffect *iface, Vector3 direction, FLOAT attack_gain, + FLOAT sustain_gain, FLOAT release_gain, TimeSpan start_delay, + TimeSpan attack_duration, TimeSpan sustain_duration, + TimeSpan release_duration, UINT32 repeat_count ) +{ + FIXME( "iface %p, direction %s, attack_gain %f, sustain_gain %f, release_gain %f, start_delay %I64u, attack_duration %I64u, " + "sustain_duration %I64u, release_duration %I64u, repeat_count %u stub!\n", iface, debugstr_vector3( &direction ), + attack_gain, sustain_gain, release_gain, start_delay.Duration, attack_duration.Duration, sustain_duration.Duration, + release_duration.Duration, repeat_count ); + return E_NOTIMPL; +} + +static const struct IConstantForceEffectVtbl effect_vtbl = +{ + effect_QueryInterface, + effect_AddRef, + effect_Release, + /* IInspectable methods */ + effect_GetIids, + effect_GetRuntimeClassName, + effect_GetTrustLevel, + /* IConstantForceEffect methods */ + effect_SetParameters, + effect_SetParametersWithEnvelope, +}; + struct constant_factory { IActivationFactory IActivationFactory_iface; @@ -91,8 +191,17 @@ static HRESULT WINAPI activation_GetTrustLevel( IActivationFactory *iface, Trust static HRESULT WINAPI activation_ActivateInstance( IActivationFactory *iface, IInspectable **instance ) { - FIXME( "iface %p, instance %p stub!\n", iface, instance ); - return E_NOTIMPL; + struct constant_effect *impl; + + TRACE( "iface %p, instance %p.\n", iface, instance ); + + if (!(impl = calloc( 1, sizeof(struct constant_effect) ))) return E_OUTOFMEMORY; + impl->IConstantForceEffect_iface.lpVtbl = &effect_vtbl; + impl->ref = 1; + + *instance = (IInspectable *)&impl->IConstantForceEffect_iface; + TRACE( "created ConstantForceEffect %p\n", *instance ); + return S_OK; } static const struct IActivationFactoryVtbl activation_vtbl = diff --git a/dlls/windows.gaming.input/private.h b/dlls/windows.gaming.input/private.h index 2e97f182e78..9bbaae5554b 100644 --- a/dlls/windows.gaming.input/private.h +++ b/dlls/windows.gaming.input/private.h @@ -31,6 +31,7 @@ #define WIDL_using_Windows_Foundation #define WIDL_using_Windows_Foundation_Collections +#define WIDL_using_Windows_Foundation_Numerics #include "windows.foundation.h" #define WIDL_using_Windows_Devices_Power #define WIDL_using_Windows_Gaming_Input @@ -38,6 +39,7 @@ #define WIDL_using_Windows_Gaming_Input_ForceFeedback #include "windows.gaming.input.custom.h" +#include "wine/debug.h" #include "wine/list.h" extern HINSTANCE windows_gaming_input; @@ -111,3 +113,9 @@ extern HRESULT async_operation_boolean_create( IUnknown *invoker, IUnknown *para DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, &impl->base_iface ) #define DEFINE_IINSPECTABLE_OUTER( pfx, iface_type, impl_type, outer_iface ) \ DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, impl->outer_iface ) + +static inline const char *debugstr_vector3( const Vector3 *vector ) +{ + if (!vector) return "(null)"; + return wine_dbg_sprintf( "[%f, %f, %f]", vector->X, vector->Y, vector->Z ); +}
1
0
0
0
Rémi Bernon : dinput/tests: Increase async bool handler wait timeout.
by Alexandre Julliard
16 May '22
16 May '22
Module: wine Branch: master Commit: 5097e67f5543a702642c84e7060ef12584565a00 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5097e67f5543a702642c84e7…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 13 09:49:51 2022 +0200 dinput/tests: Increase async bool handler wait timeout. We waited on the driver-side buffers to be sent, but sometimes the async completion needs a bit more time to complete itself. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/tests/force_feedback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dinput/tests/force_feedback.c b/dlls/dinput/tests/force_feedback.c index a1e41dedf44..806212d966d 100644 --- a/dlls/dinput/tests/force_feedback.c +++ b/dlls/dinput/tests/force_feedback.c @@ -5537,7 +5537,7 @@ static void test_windows_gaming_input(void) IAsyncInfo_Release( async_info ); wait_hid_pending( file, 100 ); - ret = WaitForSingleObject( bool_async_handler.event, 100 ); + ret = WaitForSingleObject( bool_async_handler.event, 500 ); ok( ret == 0, "WaitForSingleObject returned %#lx\n", ret ); CloseHandle( bool_async_handler.event ); check_bool_async( bool_async, 1, Completed, S_OK, TRUE ); @@ -5582,7 +5582,7 @@ static void test_windows_gaming_input(void) IAsyncInfo_Release( async_info ); wait_hid_pending( file, 100 ); - ret = WaitForSingleObject( bool_async_handler.event, 100 ); + ret = WaitForSingleObject( bool_async_handler.event, 500 ); ok( ret == 0, "WaitForSingleObject returned %#lx\n", ret ); CloseHandle( bool_async_handler.event ); check_bool_async( bool_async, 1, 4, S_OK, FALSE );
1
0
0
0
Gijs Vermeulen : shell32/tests: Use 'shellpath' as tmpfile name in PathResolve tests.
by Alexandre Julliard
16 May '22
16 May '22
Module: wine Branch: master Commit: 8ee96cff6c13c92b0a9cba0a805ddf47084ef766 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8ee96cff6c13c92b0a9cba0a…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Fri May 13 16:53:37 2022 +0200 shell32/tests: Use 'shellpath' as tmpfile name in PathResolve tests. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52995
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/tests/shellpath.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index 91ecf6b9a80..29b47ac8706 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -2954,14 +2954,14 @@ static void test_PathResolve(void) const WCHAR *expected_path; } tests[] = { /* no flags */ - { L"test", 0, FALSE, L"test" }, - { L"C:\\test", 0, TRUE, L"C:\\test" }, + { L"shellpath", 0, FALSE, L"shellpath" }, + { L"C:\\shellpath", 0, TRUE, L"C:\\shellpath" }, { L"regedit", 0, FALSE, L"regedit" }, { testfile, 0, TRUE, testfile }, /* PRF_VERIFYEXISTS */ - { L"test", PRF_VERIFYEXISTS, TRUE, testfile_lnk }, - { L"C:\\test", PRF_VERIFYEXISTS, FALSE, L"C:\\test" }, + { L"shellpath", PRF_VERIFYEXISTS, TRUE, testfile_lnk }, + { L"C:\\shellpath", PRF_VERIFYEXISTS, FALSE, L"C:\\shellpath" }, /* common extensions are tried even if PRF_TRYPROGRAMEXTENSIONS isn't passed */ /* directories in dirs parameter are always searched first even if PRF_FIRSTDIRDEF isn't passed */ { L"regedit", PRF_VERIFYEXISTS, TRUE, regedit_cmd }, @@ -2987,14 +2987,14 @@ static void test_PathResolve(void) /* PRF_VERIFYEXISTS | PRF_REQUIREABSOLUTE */ /* only PRF_VERIFYEXISTS matters*/ - { L"test", PRF_VERIFYEXISTS | PRF_REQUIREABSOLUTE, TRUE, testfile_lnk }, - { L"C:\\test", PRF_VERIFYEXISTS | PRF_REQUIREABSOLUTE, FALSE, L"C:\\test" }, + { L"shellpath", PRF_VERIFYEXISTS | PRF_REQUIREABSOLUTE, TRUE, testfile_lnk }, + { L"C:\\shellpath", PRF_VERIFYEXISTS | PRF_REQUIREABSOLUTE, FALSE, L"C:\\shellpath" }, { L"regedit", PRF_VERIFYEXISTS | PRF_REQUIREABSOLUTE, TRUE, regedit_cmd }, { testfile, PRF_VERIFYEXISTS | PRF_REQUIREABSOLUTE, TRUE, testfile_lnk }, /* PRF_TRYPROGRAMEXTENSIONS */ - { L"test", PRF_TRYPROGRAMEXTENSIONS, TRUE, testfile_lnk}, - { L"C:\\test", PRF_TRYPROGRAMEXTENSIONS, FALSE, L"C:\\test" }, + { L"shellpath", PRF_TRYPROGRAMEXTENSIONS, TRUE, testfile_lnk}, + { L"C:\\shellpath", PRF_TRYPROGRAMEXTENSIONS, FALSE, L"C:\\shellpath" }, { L"regedit", PRF_TRYPROGRAMEXTENSIONS, TRUE, regedit_cmd }, /* .dll is not tried */ { L"bcrypt", PRF_TRYPROGRAMEXTENSIONS, FALSE, L"bcrypt" }, @@ -3016,7 +3016,7 @@ static void test_PathResolve(void) GetTempPathW(MAX_PATH, tempdir); lstrcpyW(testfile, tempdir); - lstrcatW(testfile, L"test"); + lstrcatW(testfile, L"shellpath"); lstrcpyW(testfile_lnk, testfile); lstrcatW(testfile_lnk, L".lnk");
1
0
0
0
← Newer
1
...
49
50
51
52
53
54
55
...
91
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
Results per page:
10
25
50
100
200