winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2021
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
951 discussions
Start a n
N
ew thread
Rémi Bernon : dinput: Implement EnumDevicesBySemantics with EnumDevices.
by Alexandre Julliard
16 Nov '21
16 Nov '21
Module: wine Branch: master Commit: fb4c45c5daad5e98cfd29ab21422ba6a2b16534e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fb4c45c5daad5e98cfd29ab2…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Nov 16 08:23:41 2021 +0100 dinput: Implement EnumDevicesBySemantics with EnumDevices. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/dinput_main.c | 58 +++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index f2526f25972..4a6bca7d77f 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -751,42 +751,62 @@ static BOOL should_enumerate_device(const WCHAR *username, DWORD dwFlags, return should_enumerate; } +struct enum_device_by_semantics_params +{ + IDirectInput8W *iface; + const WCHAR *username; + DWORD flags; + + DIDEVICEINSTANCEW *instances; + DWORD instance_count; +}; + +static BOOL CALLBACK enum_device_by_semantics( const DIDEVICEINSTANCEW *instance, void *context ) +{ + struct enum_device_by_semantics_params *params = context; + IDirectInputImpl *This = impl_from_IDirectInput8W( params->iface ); + + if (should_enumerate_device( params->username, params->flags, &This->device_players, &instance->guidInstance )) + { + params->instance_count++; + params->instances = realloc( params->instances, sizeof(DIDEVICEINSTANCEW) * params->instance_count ); + params->instances[params->instance_count - 1] = *instance; + } + + return DIENUM_CONTINUE; +} + static HRESULT WINAPI IDirectInput8WImpl_EnumDevicesBySemantics( LPDIRECTINPUT8W iface, LPCWSTR ptszUserName, LPDIACTIONFORMATW lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBW lpCallback, LPVOID pvRef, DWORD dwFlags ) { + struct enum_device_by_semantics_params params = {.iface = iface, .username = ptszUserName, .flags = dwFlags}; + DWORD callbackFlags, enum_flags = DIEDFL_ATTACHEDONLY | (dwFlags & DIEDFL_FORCEFEEDBACK); static REFGUID guids[2] = { &GUID_SysKeyboard, &GUID_SysMouse }; static const DWORD actionMasks[] = { DIKEYBOARD_MASK, DIMOUSE_MASK }; IDirectInputImpl *This = impl_from_IDirectInput8W(iface); DIDEVICEINSTANCEW didevi; LPDIRECTINPUTDEVICE8W lpdid; - DWORD callbackFlags; unsigned int i = 0; HRESULT hr; - int device_count = 0; int remain; - DIDEVICEINSTANCEW *didevis = 0; FIXME("(this=%p,%s,%p,%p,%p,%04x): semi-stub\n", This, debugstr_w(ptszUserName), lpdiActionFormat, lpCallback, pvRef, dwFlags); didevi.dwSize = sizeof(didevi); - do + hr = IDirectInput8_EnumDevices( &This->IDirectInput8W_iface, DI8DEVCLASS_GAMECTRL, + enum_device_by_semantics, ¶ms, enum_flags ); + if (FAILED(hr)) { - hr = hid_joystick_enum_device( DI8DEVCLASS_GAMECTRL, DIEDFL_ATTACHEDONLY | dwFlags, &didevi, This->dwVersion, i++ ); - if (hr != DI_OK) continue; - if (should_enumerate_device( ptszUserName, dwFlags, &This->device_players, &didevi.guidInstance )) - { - device_count++; - didevis = realloc( didevis, sizeof(DIDEVICEINSTANCEW) * device_count ); - didevis[device_count - 1] = didevi; - } - } while (SUCCEEDED(hr)); + free( params.instances ); + return hr; + } - remain = device_count; + remain = params.instance_count; /* Add keyboard and mouse to remaining device count */ if (!(dwFlags & DIEDBSFL_FORCEFEEDBACK)) { @@ -797,21 +817,21 @@ static HRESULT WINAPI IDirectInput8WImpl_EnumDevicesBySemantics( } } - for (i = 0; i < device_count; i++) + for (i = 0; i < params.instance_count; i++) { callbackFlags = diactionformat_priorityW(lpdiActionFormat, lpdiActionFormat->dwGenre); - IDirectInput_CreateDevice(iface, &didevis[i].guidInstance, &lpdid, NULL); + IDirectInput_CreateDevice( iface, ¶ms.instances[i].guidInstance, &lpdid, NULL ); - if (lpCallback(&didevis[i], lpdid, callbackFlags, --remain, pvRef) == DIENUM_STOP) + if (lpCallback( ¶ms.instances[i], lpdid, callbackFlags, --remain, pvRef ) == DIENUM_STOP) { - free( didevis ); + free( params.instances ); IDirectInputDevice_Release(lpdid); return DI_OK; } IDirectInputDevice_Release(lpdid); } - free( didevis ); + free( params.instances ); if (dwFlags & DIEDBSFL_FORCEFEEDBACK) return DI_OK;
1
0
0
0
Rémi Bernon : dinput: Implement IDirectInputJoyConfig8_GetConfig with EnumDevices.
by Alexandre Julliard
16 Nov '21
16 Nov '21
Module: wine Branch: master Commit: 5d988edfc6050a342ed5619e7c105c829a61a080 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5d988edfc6050a342ed5619e…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Nov 16 08:23:40 2021 +0100 dinput: Implement IDirectInputJoyConfig8_GetConfig with EnumDevices. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/dinput_main.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index f53a1b502e9..f2526f25972 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -926,12 +926,24 @@ static HRESULT WINAPI JoyConfig8Impl_DeleteType(IDirectInputJoyConfig8 *iface, L return E_NOTIMPL; } +struct find_device_from_index_params +{ + UINT index; + DIDEVICEINSTANCEW instance; +}; + +static BOOL CALLBACK find_device_from_index( const DIDEVICEINSTANCEW *instance, void *context ) +{ + struct find_device_from_index_params *params = context; + params->instance = *instance; + if (!params->index--) return DIENUM_STOP; + return DIENUM_CONTINUE; +} + static HRESULT WINAPI JoyConfig8Impl_GetConfig(IDirectInputJoyConfig8 *iface, UINT id, LPDIJOYCONFIG info, DWORD flags) { - DIDEVICEINSTANCEW instance = {.dwSize = sizeof(DIDEVICEINSTANCEW)}; IDirectInputImpl *di = impl_from_IDirectInputJoyConfig8(iface); - unsigned int i = 0; - UINT found = 0; + struct find_device_from_index_params params = {.index = id}; HRESULT hr; FIXME("(%p)->(%d, %p, 0x%08x): semi-stub!\n", iface, id, info, flags); @@ -943,16 +955,11 @@ static HRESULT WINAPI JoyConfig8Impl_GetConfig(IDirectInputJoyConfig8 *iface, UI X(DIJC_CALLOUT) #undef X - do - { - hr = hid_joystick_enum_device( DI8DEVCLASS_GAMECTRL, 0, &instance, di->dwVersion, i++ ); - if (hr != DI_OK) continue; - if (flags & DIJC_GUIDINSTANCE) info->guidInstance = instance.guidInstance; - /* Only take into account the chosen id */ - if (found++ == id) return DI_OK; - } while (SUCCEEDED(hr)); - - return DIERR_NOMOREITEMS; + hr = IDirectInput8_EnumDevices( &di->IDirectInput8W_iface, DI8DEVCLASS_GAMECTRL, find_device_from_index, ¶ms, 0 ); + if (FAILED(hr)) return hr; + if (params.index != ~0) return DIERR_NOMOREITEMS; + if (flags & DIJC_GUIDINSTANCE) info->guidInstance = params.instance.guidInstance; + return DI_OK; } static HRESULT WINAPI JoyConfig8Impl_SetConfig(IDirectInputJoyConfig8 *iface, UINT id, LPCDIJOYCONFIG info, DWORD flags)
1
0
0
0
Rémi Bernon : dinput: Implement IDirectInput_EnumDevices with IDirectInput8_EnumDevices.
by Alexandre Julliard
16 Nov '21
16 Nov '21
Module: wine Branch: master Commit: 28364159b8192188580695a2a755969639e75c23 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=28364159b8192188580695a2…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Nov 16 08:23:39 2021 +0100 dinput: Implement IDirectInput_EnumDevices with IDirectInput8_EnumDevices. Instead of the other way around. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/dinput_main.c | 66 ++++++++++++++++++++++++++--------------------- dlls/dinput8/tests/hid.c | 2 -- 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 835a8656bd1..f53a1b502e9 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -315,39 +315,17 @@ __ASM_GLOBAL_FUNC( enum_callback_wrapper, static HRESULT WINAPI IDirectInputWImpl_EnumDevices( IDirectInput7W *iface, DWORD type, LPDIENUMDEVICESCALLBACKW callback, void *context, DWORD flags ) { - DIDEVICEINSTANCEW instance = {.dwSize = sizeof(DIDEVICEINSTANCEW)}; IDirectInputImpl *impl = impl_from_IDirectInput7W( iface ); - unsigned int i = 0; - HRESULT hr; TRACE( "iface %p, type %#x, callback %p, context %p, flags %#x\n", iface, type, callback, context, flags ); if (!callback) return DIERR_INVALIDPARAM; - if ((type > DI8DEVCLASS_GAMECTRL && type < DI8DEVTYPE_DEVICE) || type > DI8DEVTYPE_SUPPLEMENTAL) + if (type > DIDEVTYPE_JOYSTICK) return DIERR_INVALIDPARAM; + if (flags & ~(DIEDFL_ATTACHEDONLY | DIEDFL_FORCEFEEDBACK | DIEDFL_INCLUDEALIASES | DIEDFL_INCLUDEPHANTOMS)) return DIERR_INVALIDPARAM; - if (flags & ~(DIEDFL_ATTACHEDONLY|DIEDFL_FORCEFEEDBACK|DIEDFL_INCLUDEALIASES|DIEDFL_INCLUDEPHANTOMS|DIEDFL_INCLUDEHIDDEN)) - return DIERR_INVALIDPARAM; - - if (!impl->initialized) - return DIERR_NOTINITIALIZED; - - hr = mouse_enum_device( type, flags, &instance, impl->dwVersion, 0 ); - if (hr == DI_OK && enum_callback_wrapper( callback, &instance, context ) == DIENUM_STOP) - return DI_OK; - hr = keyboard_enum_device( type, flags, &instance, impl->dwVersion, 0 ); - if (hr == DI_OK && enum_callback_wrapper( callback, &instance, context ) == DIENUM_STOP) - return DI_OK; - do - { - hr = hid_joystick_enum_device( type, flags, &instance, impl->dwVersion, i++ ); - if (hr == DI_OK && enum_callback_wrapper( callback, &instance, context ) == DIENUM_STOP) - return DI_OK; - } - while (SUCCEEDED(hr)); - - return DI_OK; + return IDirectInput8_EnumDevices( &impl->IDirectInput8W_iface, type, callback, context, flags ); } static ULONG WINAPI IDirectInputWImpl_AddRef( IDirectInput7W *iface ) @@ -659,11 +637,41 @@ static HRESULT WINAPI IDirectInput8WImpl_CreateDevice(LPDIRECTINPUT8W iface, REF return IDirectInput7_CreateDeviceEx( &This->IDirectInput7W_iface, rguid, &IID_IDirectInputDevice8W, (LPVOID *)pdev, punk ); } -static HRESULT WINAPI IDirectInput8WImpl_EnumDevices(LPDIRECTINPUT8W iface, DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, - LPVOID pvRef, DWORD dwFlags) +static HRESULT WINAPI IDirectInput8WImpl_EnumDevices( IDirectInput8W *iface, DWORD type, LPDIENUMDEVICESCALLBACKW callback, + void *context, DWORD flags ) { - IDirectInputImpl *This = impl_from_IDirectInput8W( iface ); - return IDirectInput_EnumDevices( &This->IDirectInput7W_iface, dwDevType, lpCallback, pvRef, dwFlags ); + DIDEVICEINSTANCEW instance = {.dwSize = sizeof(DIDEVICEINSTANCEW)}; + IDirectInputImpl *impl = impl_from_IDirectInput8W( iface ); + unsigned int i = 0; + HRESULT hr; + + TRACE( "iface %p, type %#x, callback %p, context %p, flags %#x\n", iface, type, callback, context, flags ); + + if (!callback) return DIERR_INVALIDPARAM; + + if ((type > DI8DEVCLASS_GAMECTRL && type < DI8DEVTYPE_DEVICE) || type > DI8DEVTYPE_SUPPLEMENTAL) + return DIERR_INVALIDPARAM; + if (flags & ~(DIEDFL_ATTACHEDONLY | DIEDFL_FORCEFEEDBACK | DIEDFL_INCLUDEALIASES | + DIEDFL_INCLUDEPHANTOMS | DIEDFL_INCLUDEHIDDEN)) + return DIERR_INVALIDPARAM; + + if (!impl->initialized) return DIERR_NOTINITIALIZED; + + hr = mouse_enum_device( type, flags, &instance, impl->dwVersion, 0 ); + if (hr == DI_OK && enum_callback_wrapper( callback, &instance, context ) == DIENUM_STOP) + return DI_OK; + hr = keyboard_enum_device( type, flags, &instance, impl->dwVersion, 0 ); + if (hr == DI_OK && enum_callback_wrapper( callback, &instance, context ) == DIENUM_STOP) + return DI_OK; + + do + { + hr = hid_joystick_enum_device( type, flags, &instance, impl->dwVersion, i++ ); + if (hr == DI_OK && enum_callback_wrapper( callback, &instance, context ) == DIENUM_STOP) + return DI_OK; + } while (SUCCEEDED(hr)); + + return DI_OK; } static HRESULT WINAPI IDirectInput8WImpl_GetDeviceStatus(LPDIRECTINPUT8W iface, REFGUID rguid) diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index 3c8492842e4..73f8ea33650 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -3600,7 +3600,6 @@ static HRESULT create_dinput_device( DWORD version, DIDEVICEINSTANCEW *devinst, hr = IDirectInput_EnumDevices( di, 0xdeadbeef, enum_device_count, &count, DIEDFL_ALLDEVICES ); ok( hr == DIERR_INVALIDPARAM, "EnumDevices returned: %#x\n", hr ); hr = IDirectInput_EnumDevices( di, 0, enum_device_count, &count, DIEDFL_INCLUDEHIDDEN ); - todo_wine ok( hr == DIERR_INVALIDPARAM, "EnumDevices returned: %#x\n", hr ); count = 0; @@ -3641,7 +3640,6 @@ static HRESULT create_dinput_device( DWORD version, DIDEVICEINSTANCEW *devinst, else ok( count == 1, "got count %u, expected 1\n", count ); hr = IDirectInput_EnumDevices( di, 0x14, enum_device_count, &count, DIEDFL_ALLDEVICES ); - todo_wine ok( hr == DIERR_INVALIDPARAM, "EnumDevices returned: %#x\n", hr ); hr = IDirectInput_CreateDevice( di, &expect_guid_product, (IDirectInputDeviceW **)device, NULL );
1
0
0
0
Rémi Bernon : dinput8/tests: Add some IDirectInput(8)_EnumDevices tests.
by Alexandre Julliard
16 Nov '21
16 Nov '21
Module: wine Branch: master Commit: e14254ee2be5e5f2b0147b3bab7a8fe3c02d26c4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e14254ee2be5e5f2b0147b3b…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Nov 16 08:23:38 2021 +0100 dinput8/tests: Add some IDirectInput(8)_EnumDevices tests. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput8/tests/hid.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 110 insertions(+), 1 deletion(-) diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index d553fa92ef7..3c8492842e4 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -3453,6 +3453,13 @@ static BOOL CALLBACK check_created_effect_objects( IDirectInputEffect *effect, v return DIENUM_CONTINUE; } +static BOOL CALLBACK enum_device_count( const DIDEVICEINSTANCEW *devinst, void *context ) +{ + DWORD *count = context; + *count = *count + 1; + return DIENUM_CONTINUE; +} + static HRESULT create_dinput_device( DWORD version, DIDEVICEINSTANCEW *devinst, IDirectInputDevice8W **device ) { DIPROPDWORD prop_dword = @@ -3466,8 +3473,8 @@ static HRESULT create_dinput_device( DWORD version, DIDEVICEINSTANCEW *devinst, }; IDirectInput8W *di8; IDirectInputW *di; + ULONG ref, count; HRESULT hr; - ULONG ref; if (version >= 0x800) { @@ -3488,6 +3495,57 @@ static HRESULT create_dinput_device( DWORD version, DIDEVICEINSTANCEW *devinst, return DIERR_DEVICENOTREG; } + hr = IDirectInput8_EnumDevices( di8, DI8DEVCLASS_ALL, NULL, NULL, DIEDFL_ALLDEVICES ); + ok( hr == DIERR_INVALIDPARAM, "EnumDevices returned: %#x\n", hr ); + hr = IDirectInput8_EnumDevices( di8, DI8DEVCLASS_ALL, enum_device_count, &count, 0xdeadbeef ); + ok( hr == DIERR_INVALIDPARAM, "EnumDevices returned: %#x\n", hr ); + hr = IDirectInput8_EnumDevices( di8, 0xdeadbeef, enum_device_count, &count, DIEDFL_ALLDEVICES ); + ok( hr == DIERR_INVALIDPARAM, "EnumDevices returned: %#x\n", hr ); + + count = 0; + hr = IDirectInput8_EnumDevices( di8, DI8DEVCLASS_ALL, enum_device_count, &count, DIEDFL_ALLDEVICES ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + ok( count == 3, "got count %u, expected 0\n", count ); + count = 0; + hr = IDirectInput8_EnumDevices( di8, DI8DEVCLASS_DEVICE, enum_device_count, &count, DIEDFL_ALLDEVICES ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + ok( count == 0, "got count %u, expected 0\n", count ); + count = 0; + hr = IDirectInput8_EnumDevices( di8, DI8DEVCLASS_POINTER, enum_device_count, &count, + DIEDFL_INCLUDEALIASES | DIEDFL_INCLUDEPHANTOMS | DIEDFL_INCLUDEHIDDEN ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + todo_wine + ok( count == 3, "got count %u, expected 3\n", count ); + count = 0; + hr = IDirectInput8_EnumDevices( di8, DI8DEVCLASS_KEYBOARD, enum_device_count, &count, + DIEDFL_INCLUDEALIASES | DIEDFL_INCLUDEPHANTOMS | DIEDFL_INCLUDEHIDDEN ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + todo_wine + ok( count == 3, "got count %u, expected 3\n", count ); + count = 0; + hr = IDirectInput8_EnumDevices( di8, DI8DEVCLASS_GAMECTRL, enum_device_count, &count, + DIEDFL_INCLUDEALIASES | DIEDFL_INCLUDEPHANTOMS | DIEDFL_INCLUDEHIDDEN ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + ok( count == 1, "got count %u, expected 1\n", count ); + + count = 0; + hr = IDirectInput8_EnumDevices( di8, (devinst->dwDevType & 0xff), enum_device_count, &count, DIEDFL_ALLDEVICES ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + todo_wine + ok( count == 1, "got count %u, expected 1\n", count ); + + count = 0; + hr = IDirectInput8_EnumDevices( di8, (devinst->dwDevType & 0xff), enum_device_count, &count, DIEDFL_FORCEFEEDBACK ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + if (IsEqualGUID( &devinst->guidFFDriver, &GUID_NULL )) ok( count == 0, "got count %u, expected 0\n", count ); + else todo_wine ok( count == 1, "got count %u, expected 1\n", count ); + + count = 0; + hr = IDirectInput8_EnumDevices( di8, (devinst->dwDevType & 0xff) + 1, enum_device_count, &count, DIEDFL_ALLDEVICES ); + if ((devinst->dwDevType & 0xff) != DI8DEVTYPE_SUPPLEMENTAL) ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + else ok( hr == DIERR_INVALIDPARAM, "EnumDevices returned: %#x\n", hr ); + ok( count == 0, "got count %u, expected 0\n", count ); + hr = IDirectInput8_CreateDevice( di8, &devinst->guidInstance, NULL, NULL ); ok( hr == E_POINTER, "CreateDevice returned %#x\n", hr ); hr = IDirectInput8_CreateDevice( di8, NULL, device, NULL ); @@ -3535,6 +3593,57 @@ static HRESULT create_dinput_device( DWORD version, DIDEVICEINSTANCEW *devinst, return DIERR_DEVICENOTREG; } + hr = IDirectInput_EnumDevices( di, 0, NULL, NULL, DIEDFL_ALLDEVICES ); + ok( hr == DIERR_INVALIDPARAM, "EnumDevices returned: %#x\n", hr ); + hr = IDirectInput_EnumDevices( di, 0, enum_device_count, &count, 0xdeadbeef ); + ok( hr == DIERR_INVALIDPARAM, "EnumDevices returned: %#x\n", hr ); + hr = IDirectInput_EnumDevices( di, 0xdeadbeef, enum_device_count, &count, DIEDFL_ALLDEVICES ); + ok( hr == DIERR_INVALIDPARAM, "EnumDevices returned: %#x\n", hr ); + hr = IDirectInput_EnumDevices( di, 0, enum_device_count, &count, DIEDFL_INCLUDEHIDDEN ); + todo_wine + ok( hr == DIERR_INVALIDPARAM, "EnumDevices returned: %#x\n", hr ); + + count = 0; + hr = IDirectInput_EnumDevices( di, 0, enum_device_count, &count, DIEDFL_ALLDEVICES ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + ok( count == 3, "got count %u, expected 0\n", count ); + count = 0; + hr = IDirectInput_EnumDevices( di, DIDEVTYPE_DEVICE, enum_device_count, &count, DIEDFL_ALLDEVICES ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + ok( count == 0, "got count %u, expected 0\n", count ); + count = 0; + hr = IDirectInput_EnumDevices( di, DIDEVTYPE_MOUSE, enum_device_count, &count, + DIEDFL_INCLUDEALIASES | DIEDFL_INCLUDEPHANTOMS ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + todo_wine + ok( count == 3, "got count %u, expected 3\n", count ); + count = 0; + hr = IDirectInput_EnumDevices( di, DIDEVTYPE_KEYBOARD, enum_device_count, &count, + DIEDFL_INCLUDEALIASES | DIEDFL_INCLUDEPHANTOMS ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + todo_wine + ok( count == 3, "got count %u, expected 3\n", count ); + count = 0; + hr = IDirectInput_EnumDevices( di, DIDEVTYPE_JOYSTICK, enum_device_count, &count, + DIEDFL_INCLUDEALIASES | DIEDFL_INCLUDEPHANTOMS ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + ok( count == 1, "got count %u, expected 1\n", count ); + + count = 0; + hr = IDirectInput_EnumDevices( di, (devinst->dwDevType & 0xff), enum_device_count, &count, DIEDFL_ALLDEVICES ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + ok( count == 1, "got count %u, expected 1\n", count ); + + count = 0; + hr = IDirectInput_EnumDevices( di, (devinst->dwDevType & 0xff), enum_device_count, &count, DIEDFL_FORCEFEEDBACK ); + ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr ); + if (IsEqualGUID( &devinst->guidFFDriver, &GUID_NULL )) todo_wine ok( count == 0, "got count %u, expected 0\n", count ); + else ok( count == 1, "got count %u, expected 1\n", count ); + + hr = IDirectInput_EnumDevices( di, 0x14, enum_device_count, &count, DIEDFL_ALLDEVICES ); + todo_wine + ok( hr == DIERR_INVALIDPARAM, "EnumDevices returned: %#x\n", hr ); + hr = IDirectInput_CreateDevice( di, &expect_guid_product, (IDirectInputDeviceW **)device, NULL ); ok( hr == DI_OK, "CreateDevice returned %#x\n", hr );
1
0
0
0
Rémi Bernon : dinput: Stub support for DIPROP_AUTOCENTER property.
by Alexandre Julliard
16 Nov '21
16 Nov '21
Module: wine Branch: master Commit: e6eb909d2125da1a4f176d891ba57bfab9476418 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e6eb909d2125da1a4f176d89…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Nov 16 08:23:37 2021 +0100 dinput: Stub support for DIPROP_AUTOCENTER property. Signed-off-by: Ivo Ivanov <logos128(a)gmail.com> Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/device.c | 16 +++++++++++++--- dlls/dinput/device_private.h | 2 ++ dlls/dinput8/tests/hid.c | 6 +++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index c58ffc7ac73..8d65d051a3b 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -974,9 +974,13 @@ static HRESULT WINAPI dinput_device_GetProperty( IDirectInputDevice8W *iface, co return impl->vtbl->get_property( iface, LOWORD( guid ), header, &instance ); case (DWORD_PTR)DIPROP_AUTOCENTER: + { + DIPROPDWORD *value = (DIPROPDWORD *)header; if (header->dwSize != sizeof(DIPROPDWORD)) return DIERR_INVALIDPARAM; - return DIERR_UNSUPPORTED; - + if (!(impl->caps.dwFlags & DIDC_FORCEFEEDBACK)) return DIERR_UNSUPPORTED; + value->dwData = impl->autocenter; + return DI_OK; + } case (DWORD_PTR)DIPROP_BUFFERSIZE: { DIPROPDWORD *value = (DIPROPDWORD *)header; @@ -1076,11 +1080,17 @@ static HRESULT WINAPI dinput_device_SetProperty( IDirectInputDevice8W *iface, co { const DIPROPDWORD *value = (const DIPROPDWORD *)header; if (header->dwSize != sizeof(DIPROPDWORD)) return DIERR_INVALIDPARAM; + if (header->dwHow != DIPH_DEVICE) return DIERR_UNSUPPORTED; EnterCriticalSection( &impl->crit ); if (impl->acquired) hr = DIERR_ACQUIRED; else if (value->dwData > DIPROPAUTOCENTER_ON) hr = DIERR_INVALIDPARAM; else if (!(impl->caps.dwFlags & DIDC_FORCEFEEDBACK)) hr = DIERR_UNSUPPORTED; - else hr = DI_OK; + else + { + FIXME( "DIPROP_AUTOCENTER stub!\n" ); + impl->autocenter = value->dwData; + hr = DI_OK; + } LeaveCriticalSection( &impl->crit ); return hr; } diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h index e77d0190a48..02befc6e869 100644 --- a/dlls/dinput/device_private.h +++ b/dlls/dinput/device_private.h @@ -96,6 +96,8 @@ struct dinput_device BYTE device_state_report_id; BYTE device_state[DEVICE_STATE_MAX_SIZE]; + + BOOL autocenter; }; extern HRESULT dinput_device_alloc( SIZE_T size, const struct dinput_device_vtbl *vtbl, const GUID *guid, diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index a460357af0c..d553fa92ef7 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -7616,9 +7616,13 @@ static void test_force_feedback_joystick( DWORD version ) hr = IDirectInputDevice8_SetCooperativeLevel( device, hwnd, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE ); ok( hr == DI_OK, "SetCooperativeLevel returned: %#x\n", hr ); + prop_dword.diph.dwHow = DIPH_BYUSAGE; + prop_dword.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC ); + prop_dword.dwData = DIPROPAUTOCENTER_ON; + hr = IDirectInputDevice8_SetProperty( device, DIPROP_AUTOCENTER, &prop_dword.diph ); + ok( hr == DIERR_UNSUPPORTED, "SetProperty DIPROP_AUTOCENTER returned %#x\n", hr ); prop_dword.diph.dwHow = DIPH_DEVICE; prop_dword.diph.dwObj = 0; - prop_dword.dwData = DIPROPAUTOCENTER_ON; hr = IDirectInputDevice8_SetProperty( device, DIPROP_AUTOCENTER, &prop_dword.diph ); ok( hr == DI_OK, "SetProperty DIPROP_AUTOCENTER returned %#x\n", hr );
1
0
0
0
Rémi Bernon : dinput: Implement HID joystick object names from their usages.
by Alexandre Julliard
16 Nov '21
16 Nov '21
Module: wine Branch: master Commit: 23194bb0476e1493798c57e7deb0ae5796b1cb4d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=23194bb0476e1493798c57e7…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Nov 16 08:23:36 2021 +0100 dinput: Implement HID joystick object names from their usages. Fixes some issues with apps like WheelCheck from iRacing, which show detailed info about available objects on the device (such as axes, buttons, other non-data caps, collections, etc.). Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/joystick_hid.c | 92 +++++++++++++++++++++++++++++++++++++++++++++- dlls/dinput8/tests/hid.c | 13 ++++--- 2 files changed, 98 insertions(+), 7 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=23194bb0476e1493798c…
1
0
0
0
Rémi Bernon : dinput8/tests: Make sure SetCooperativeLevel window is foreground.
by Alexandre Julliard
16 Nov '21
16 Nov '21
Module: wine Branch: master Commit: 98a0a7561042e584a861f598a438f1f5adaf659c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=98a0a7561042e584a861f598…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Nov 16 08:23:35 2021 +0100 dinput8/tests: Make sure SetCooperativeLevel window is foreground. This should prevent spurious failures on Windows. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput8/tests/hid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index 007f81688cc..9ec9d147dd1 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -4267,6 +4267,7 @@ static void test_simple_joystick(void) hwnd = CreateWindowW( L"static", L"dinput", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 10, 10, 200, 200, NULL, NULL, NULL, NULL ); + SetForegroundWindow( hwnd ); hr = IDirectInputDevice8_SetCooperativeLevel( device, hwnd, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE ); ok( hr == DI_OK, "SetCooperativeLevel returned: %#x\n", hr );
1
0
0
0
Nikolay Sivov : d3d10/effect: Add initial support for indexing expressions.
by Alexandre Julliard
15 Nov '21
15 Nov '21
Module: wine Branch: master Commit: a4fe643920f3f66602fff75cd0887e360c460c49 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a4fe643920f3f66602fff75c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Nov 9 14:39:41 2021 +0300 d3d10/effect: Add initial support for indexing expressions. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d10/effect.c | 595 +++++++++++++++++++++++++++++++++++++++++++++- dlls/d3d10/tests/effect.c | 147 ++++++++++++ 2 files changed, 734 insertions(+), 8 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=a4fe643920f3f66602ff…
1
0
0
0
Thomas Faber : dbghelp: Use _NT_ALT_SYMBOL_PATH.
by Alexandre Julliard
15 Nov '21
15 Nov '21
Module: wine Branch: master Commit: 40dfd9b8b140490604eaae1ccb3abcb14ce12db3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=40dfd9b8b140490604eaae1c…
Author: Thomas Faber <thomas.faber(a)reactos.org> Date: Fri Nov 12 20:17:01 2021 -0500 dbghelp: Use _NT_ALT_SYMBOL_PATH. Signed-off-by: Thomas Faber <thomas.faber(a)reactos.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/dbghelp.c | 6 +++--- dlls/dbghelp/tests/dbghelp.c | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c index 063fe4cdc6d..d854f6287a0 100644 --- a/dlls/dbghelp/dbghelp.c +++ b/dlls/dbghelp/dbghelp.c @@ -183,9 +183,9 @@ static WCHAR* make_default_search_path(void) unsigned alt_sym_path_len; sym_path_len = GetEnvironmentVariableW(L"_NT_SYMBOL_PATH", NULL, 0); - alt_sym_path_len = GetEnvironmentVariableW(L"_NT_ALTERNATE_SYMBOL_PATH", NULL, 0); + alt_sym_path_len = GetEnvironmentVariableW(L"_NT_ALT_SYMBOL_PATH", NULL, 0); - /* The default symbol path is ".[;%_NT_SYMBOL_PATH%][;%_NT_ALTERNATE_SYMBOL_PATH%]". + /* The default symbol path is ".[;%_NT_SYMBOL_PATH%][;%_NT_ALT_SYMBOL_PATH%]". * If the variables exist, the lengths include a null-terminator. We use that * space for the semicolons, and only add the initial dot and the final null. */ search_path = HeapAlloc(GetProcessHeap(), 0, @@ -204,7 +204,7 @@ static WCHAR* make_default_search_path(void) if (alt_sym_path_len) { *p++ = L';'; - GetEnvironmentVariableW(L"_NT_ALTERNATE_SYMBOL_PATH", p, alt_sym_path_len); + GetEnvironmentVariableW(L"_NT_ALT_SYMBOL_PATH", p, alt_sym_path_len); p += alt_sym_path_len - 1; } *p = L'\0'; diff --git a/dlls/dbghelp/tests/dbghelp.c b/dlls/dbghelp/tests/dbghelp.c index a42e83aa2c8..b7e828281cd 100644 --- a/dlls/dbghelp/tests/dbghelp.c +++ b/dlls/dbghelp/tests/dbghelp.c @@ -171,7 +171,6 @@ static void test_search_path(void) ok(ret == TRUE, "ret = %d\n", ret); ret = SymGetSearchPath(GetCurrentProcess(), search_path, ARRAY_SIZE(search_path)); ok(ret == TRUE, "ret = %d\n", ret); - todo_wine ok(!strcmp(search_path, ".;X:\\;Y:\\"), "Got search path '%s', expected '.;X:\\;Y:\\'\n", search_path); /* With just _NT_ALT_SYMBOL_PATH */ @@ -180,7 +179,6 @@ static void test_search_path(void) ok(ret == TRUE, "ret = %d\n", ret); ret = SymGetSearchPath(GetCurrentProcess(), search_path, ARRAY_SIZE(search_path)); ok(ret == TRUE, "ret = %d\n", ret); - todo_wine ok(!strcmp(search_path, ".;Y:\\"), "Got search path '%s', expected '.;Y:\\'\n", search_path); /* Restore original search path */
1
0
0
0
Thomas Faber : dbghelp: Use . instead of concrete path for search path.
by Alexandre Julliard
15 Nov '21
15 Nov '21
Module: wine Branch: master Commit: bb2802984dac940b0b8f91f64e67d3f4bf2b78e6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bb2802984dac940b0b8f91f6…
Author: Thomas Faber <thomas.faber(a)reactos.org> Date: Fri Nov 12 18:17:53 2021 -0500 dbghelp: Use . instead of concrete path for search path. Signed-off-by: Thomas Faber <thomas.faber(a)reactos.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/dbghelp.c | 45 +++++++++++++++++++++++++------------------- dlls/dbghelp/tests/dbghelp.c | 4 ---- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c index 428ea10e2d3..063fe4cdc6d 100644 --- a/dlls/dbghelp/dbghelp.c +++ b/dlls/dbghelp/dbghelp.c @@ -178,29 +178,36 @@ struct cpu* cpu_find(DWORD machine) static WCHAR* make_default_search_path(void) { WCHAR* search_path; - unsigned size; - unsigned len; - - search_path = HeapAlloc(GetProcessHeap(), 0, (len = MAX_PATH) * sizeof(WCHAR)); - while ((size = GetCurrentDirectoryW(len, search_path)) >= len) - search_path = HeapReAlloc(GetProcessHeap(), 0, search_path, (len *= 2) * sizeof(WCHAR)); - search_path = HeapReAlloc(GetProcessHeap(), 0, search_path, (size + 1) * sizeof(WCHAR)); - - len = GetEnvironmentVariableW(L"_NT_SYMBOL_PATH", NULL, 0); - if (len) + WCHAR* p; + unsigned sym_path_len; + unsigned alt_sym_path_len; + + sym_path_len = GetEnvironmentVariableW(L"_NT_SYMBOL_PATH", NULL, 0); + alt_sym_path_len = GetEnvironmentVariableW(L"_NT_ALTERNATE_SYMBOL_PATH", NULL, 0); + + /* The default symbol path is ".[;%_NT_SYMBOL_PATH%][;%_NT_ALTERNATE_SYMBOL_PATH%]". + * If the variables exist, the lengths include a null-terminator. We use that + * space for the semicolons, and only add the initial dot and the final null. */ + search_path = HeapAlloc(GetProcessHeap(), 0, + (1 + sym_path_len + alt_sym_path_len + 1) * sizeof(WCHAR)); + if (!search_path) return NULL; + + p = search_path; + *p++ = L'.'; + if (sym_path_len) { - search_path = HeapReAlloc(GetProcessHeap(), 0, search_path, (size + 1 + len + 1) * sizeof(WCHAR)); - search_path[size] = ';'; - GetEnvironmentVariableW(L"_NT_SYMBOL_PATH", search_path + size + 1, len); - size += 1 + len; + *p++ = L';'; + GetEnvironmentVariableW(L"_NT_SYMBOL_PATH", p, sym_path_len); + p += sym_path_len - 1; } - len = GetEnvironmentVariableW(L"_NT_ALTERNATE_SYMBOL_PATH", NULL, 0); - if (len) + + if (alt_sym_path_len) { - search_path = HeapReAlloc(GetProcessHeap(), 0, search_path, (size + 1 + len + 1) * sizeof(WCHAR)); - search_path[size] = ';'; - GetEnvironmentVariableW(L"_NT_ALTERNATE_SYMBOL_PATH", search_path + size + 1, len); + *p++ = L';'; + GetEnvironmentVariableW(L"_NT_ALTERNATE_SYMBOL_PATH", p, alt_sym_path_len); + p += alt_sym_path_len - 1; } + *p = L'\0'; return search_path; } diff --git a/dlls/dbghelp/tests/dbghelp.c b/dlls/dbghelp/tests/dbghelp.c index 06c21ec288c..a42e83aa2c8 100644 --- a/dlls/dbghelp/tests/dbghelp.c +++ b/dlls/dbghelp/tests/dbghelp.c @@ -141,7 +141,6 @@ static void test_search_path(void) * We unset both variables earlier so should simply get "." */ ret = SymGetSearchPath(GetCurrentProcess(), search_path, ARRAY_SIZE(search_path)); ok(ret == TRUE, "ret = %d\n", ret); - todo_wine ok(!strcmp(search_path, "."), "Got search path '%s', expected '.'\n", search_path); /* Set an arbitrary search path */ @@ -156,7 +155,6 @@ static void test_search_path(void) ok(ret == TRUE, "ret = %d\n", ret); ret = SymGetSearchPath(GetCurrentProcess(), search_path, ARRAY_SIZE(search_path)); ok(ret == TRUE, "ret = %d\n", ret); - todo_wine ok(!strcmp(search_path, "."), "Got search path '%s', expected '.'\n", search_path); /* With _NT_SYMBOL_PATH */ @@ -165,7 +163,6 @@ static void test_search_path(void) ok(ret == TRUE, "ret = %d\n", ret); ret = SymGetSearchPath(GetCurrentProcess(), search_path, ARRAY_SIZE(search_path)); ok(ret == TRUE, "ret = %d\n", ret); - todo_wine ok(!strcmp(search_path, ".;X:\\"), "Got search path '%s', expected '.;X:\\'\n", search_path); /* With both _NT_SYMBOL_PATH and _NT_ALT_SYMBOL_PATH */ @@ -192,7 +189,6 @@ static void test_search_path(void) ok(ret == TRUE, "ret = %d\n", ret); ret = SymGetSearchPath(GetCurrentProcess(), search_path, ARRAY_SIZE(search_path)); ok(ret == TRUE, "ret = %d\n", ret); - todo_wine ok(!strcmp(search_path, "."), "Got search path '%s', expected '.'\n", search_path); }
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
96
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200