winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1138 discussions
Start a n
N
ew thread
Paul Gofman : ws2_32: Manage shorter length for TCP_NODELAY.
by Alexandre Julliard
10 Mar '22
10 Mar '22
Module: wine Branch: master Commit: 4259f9333777406b7b3bc78cb453eb0cf4426013 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4259f9333777406b7b3bc78c…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Thu Mar 10 12:40:52 2022 +0300 ws2_32: Manage shorter length for TCP_NODELAY. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/socket.c | 18 ++++++++++++------ dlls/ws2_32/tests/sock.c | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 9f140a6ee44..80665ff57a4 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -1725,6 +1725,12 @@ int WINAPI getsockopt( SOCKET s, int level, int optname, char *optval, int *optl switch(optname) { case TCP_NODELAY: + if (*optlen < 1 || !optval) + { + SetLastError( WSAEFAULT ); + return SOCKET_ERROR; + } + *optlen = 1; return server_getsockopt( s, IOCTL_AFD_WINE_GET_TCP_NODELAY, optval, optlen ); default: @@ -2998,14 +3004,14 @@ int WINAPI setsockopt( SOCKET s, int level, int optname, const char *optval, int switch(optname) { case TCP_NODELAY: - { - INT nodelay = *optval; - if (optlen <= 0) { - SetLastError(WSAEFAULT); + if (optlen <= 0 || !optval) + { + SetLastError( optlen && optval ? WSAENOBUFS : WSAEFAULT ); return SOCKET_ERROR; } - return server_setsockopt( s, IOCTL_AFD_WINE_SET_TCP_NODELAY, (char*)&nodelay, sizeof(nodelay) ); - } + value = *optval; + return server_setsockopt( s, IOCTL_AFD_WINE_SET_TCP_NODELAY, (char*)&value, sizeof(value) ); + default: FIXME("Unknown IPPROTO_TCP optname 0x%08x\n", optname); SetLastError(WSAENOPROTOOPT); diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index dfa1640e8bc..afdfc68905b 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -1181,6 +1181,7 @@ static void test_set_getsockopt(void) {AF_INET, SOCK_STREAM, SOL_SOCKET, SO_SNDBUF, FALSE, {1, 2, 4}, {0xdeadbe00, 0xdead0000}, TRUE}, {AF_INET, SOCK_STREAM, SOL_SOCKET, SO_SNDTIMEO, FALSE, {1, 2, 4}, {0}, TRUE}, {AF_INET, SOCK_STREAM, SOL_SOCKET, SO_OPENTYPE, FALSE, {1, 2, 4}, {0}, TRUE}, + {AF_INET, SOCK_STREAM, IPPROTO_TCP, TCP_NODELAY, TRUE, {1, 1, 1}, {0}, TRUE}, {AF_INET, SOCK_DGRAM, IPPROTO_IP, IP_MULTICAST_LOOP, TRUE, {1, 1, 4}, {0}, TRUE, TRUE}, {AF_INET, SOCK_DGRAM, IPPROTO_IP, IP_MULTICAST_TTL, TRUE, {1, 1, 4}, {0}, FALSE}, {AF_INET, SOCK_DGRAM, IPPROTO_IP, IP_TOS, TRUE, {1, 1, 4}, {0}, FALSE},
1
0
0
0
Rémi Bernon : windows.gaming.input: Implement GetCurrentReading for the Gamepad runtimeclass.
by Alexandre Julliard
10 Mar '22
10 Mar '22
Module: wine Branch: master Commit: c2e2e919bc0330116c704f6ce86610b57cb3d86e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c2e2e919bc0330116c704f6c…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 10 13:05:52 2022 +0100 windows.gaming.input: Implement GetCurrentReading for the Gamepad runtimeclass. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.gaming.input/gamepad.c | 72 +++++++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 2 deletions(-) diff --git a/dlls/windows.gaming.input/gamepad.c b/dlls/windows.gaming.input/gamepad.c index fbb439d3fec..b815d5c0a13 100644 --- a/dlls/windows.gaming.input/gamepad.c +++ b/dlls/windows.gaming.input/gamepad.c @@ -65,6 +65,7 @@ struct gamepad LONG ref; IGameControllerProvider *provider; + IWineGameControllerProvider *wine_provider; }; static inline struct gamepad *impl_from_IGameControllerImpl( IGameControllerImpl *iface ) @@ -120,6 +121,8 @@ static ULONG WINAPI controller_Release( IGameControllerImpl *iface ) if (!ref) { + if (impl->wine_provider) + IWineGameControllerProvider_Release( impl->wine_provider ); IGameControllerProvider_Release( impl->provider ); free( impl ); } @@ -157,6 +160,10 @@ static HRESULT WINAPI controller_Initialize( IGameControllerImpl *iface, IGameCo impl->IGameController_outer = outer; IGameControllerProvider_AddRef( (impl->provider = provider) ); + hr = IGameControllerProvider_QueryInterface( provider, &IID_IWineGameControllerProvider, + (void **)&impl->wine_provider ); + if (FAILED(hr)) return hr; + EnterCriticalSection( &gamepad_cs ); if (SUCCEEDED(hr = init_gamepads())) hr = IVector_Gamepad_Append( gamepads, &impl->IGamepad_iface ); @@ -222,8 +229,69 @@ static HRESULT WINAPI gamepad_put_Vibration( IGamepad *iface, struct GamepadVibr static HRESULT WINAPI gamepad_GetCurrentReading( IGamepad *iface, struct GamepadReading *value ) { - FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL;} + struct gamepad *impl = impl_from_IGamepad( iface ); + struct WineGameControllerState state; + HRESULT hr; + + TRACE( "iface %p, value %p.\n", iface, value ); + + if (FAILED(hr = IWineGameControllerProvider_get_State( impl->wine_provider, &state ))) return hr; + + value->Buttons = 0; + if (state.buttons[0]) value->Buttons |= GamepadButtons_A; + if (state.buttons[1]) value->Buttons |= GamepadButtons_B; + if (state.buttons[2]) value->Buttons |= GamepadButtons_X; + if (state.buttons[3]) value->Buttons |= GamepadButtons_Y; + if (state.buttons[4]) value->Buttons |= GamepadButtons_LeftShoulder; + if (state.buttons[5]) value->Buttons |= GamepadButtons_RightShoulder; + if (state.buttons[6]) value->Buttons |= GamepadButtons_Menu; + if (state.buttons[7]) value->Buttons |= GamepadButtons_View; + if (state.buttons[8]) value->Buttons |= GamepadButtons_LeftThumbstick; + if (state.buttons[9]) value->Buttons |= GamepadButtons_RightThumbstick; + + switch (state.switches[0]) + { + case GameControllerSwitchPosition_Up: + case GameControllerSwitchPosition_UpRight: + case GameControllerSwitchPosition_UpLeft: + value->Buttons |= GamepadButtons_DPadUp; + break; + case GameControllerSwitchPosition_Down: + case GameControllerSwitchPosition_DownRight: + case GameControllerSwitchPosition_DownLeft: + value->Buttons |= GamepadButtons_DPadDown; + break; + default: + break; + } + + switch (state.switches[0]) + { + case GameControllerSwitchPosition_Right: + case GameControllerSwitchPosition_UpRight: + case GameControllerSwitchPosition_DownRight: + value->Buttons |= GamepadButtons_DPadRight; + break; + case GameControllerSwitchPosition_Left: + case GameControllerSwitchPosition_UpLeft: + case GameControllerSwitchPosition_DownLeft: + value->Buttons |= GamepadButtons_DPadLeft; + break; + default: + break; + } + + value->LeftThumbstickX = 2. * state.axes[0] - 1.; + value->LeftThumbstickY = 1. - 2. * state.axes[1]; + value->LeftTrigger = state.axes[2]; + value->RightThumbstickX = 2. * state.axes[3] - 1.; + value->RightThumbstickY = 1. - 2. * state.axes[4]; + value->RightTrigger = state.axes[5]; + + value->Timestamp = state.timestamp; + + return hr; +} static const struct IGamepadVtbl gamepad_vtbl = {
1
0
0
0
Rémi Bernon : windows.gaming.input: Implement GetCurrentReading for the RawGameController runtimeclass.
by Alexandre Julliard
10 Mar '22
10 Mar '22
Module: wine Branch: master Commit: bd628ba8c711f19c95ebe8b639e4574c121843e3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bd628ba8c711f19c95ebe8b6…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 10 13:05:51 2022 +0100 windows.gaming.input: Implement GetCurrentReading for the RawGameController runtimeclass. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.gaming.input/controller.c | 16 +++++++- dlls/windows.gaming.input/provider.c | 68 ++++++++++++++++++++++++++++++++++ dlls/windows.gaming.input/provider.idl | 11 ++++++ 3 files changed, 93 insertions(+), 2 deletions(-) diff --git a/dlls/windows.gaming.input/controller.c b/dlls/windows.gaming.input/controller.c index 83e4e167ec9..3e00da917e7 100644 --- a/dlls/windows.gaming.input/controller.c +++ b/dlls/windows.gaming.input/controller.c @@ -262,9 +262,21 @@ static HRESULT WINAPI raw_controller_GetCurrentReading( IRawGameController *ifac UINT32 switches_size, enum GameControllerSwitchPosition *switches, UINT32 axes_size, DOUBLE *axes, UINT64 *timestamp ) { - FIXME( "iface %p, buttons_size %u, buttons %p, switches_size %u, switches %p, axes_size %u, axes %p, timestamp %p stub!\n", + struct controller *impl = impl_from_IRawGameController( iface ); + WineGameControllerState state; + HRESULT hr; + + TRACE( "iface %p, buttons_size %u, buttons %p, switches_size %u, switches %p, axes_size %u, axes %p, timestamp %p.\n", iface, buttons_size, buttons, switches_size, switches, axes_size, axes, timestamp ); - return E_NOTIMPL; + + if (FAILED(hr = IWineGameControllerProvider_get_State( impl->wine_provider, &state ))) return hr; + + memcpy( axes, state.axes, axes_size * sizeof(*axes) ); + memcpy( buttons, state.buttons, buttons_size * sizeof(*buttons) ); + memcpy( switches, state.switches, switches_size * sizeof(*switches) ); + *timestamp = state.timestamp; + + return hr; } static HRESULT WINAPI raw_controller_GetSwitchKind( IRawGameController *iface, INT32 index, enum GameControllerSwitchKind *value ) diff --git a/dlls/windows.gaming.input/provider.c b/dlls/windows.gaming.input/provider.c index 7883ec6af68..0877938f774 100644 --- a/dlls/windows.gaming.input/provider.c +++ b/dlls/windows.gaming.input/provider.c @@ -182,6 +182,69 @@ static HRESULT WINAPI wine_provider_get_SwitchCount( IWineGameControllerProvider return hr; } +static HRESULT WINAPI wine_provider_get_State( IWineGameControllerProvider *iface, struct WineGameControllerState *out ) +{ + struct provider *impl = impl_from_IWineGameControllerProvider( iface ); + DIJOYSTATE2 state = {0}; + UINT32 i = 0; + HRESULT hr; + + TRACE( "iface %p, out %p.\n", iface, out ); + + if (FAILED(hr = IDirectInputDevice8_GetDeviceState( impl->dinput_device, sizeof(state), &state ))) + { + WARN( "Failed to read device state, hr %#lx\n", hr ); + return hr; + } + + i = ARRAY_SIZE(state.rgbButtons); + while (i--) out->buttons[i] = (state.rgbButtons[i] != 0); + + i = ARRAY_SIZE(state.rgdwPOV); + while (i--) + { + if (state.rgdwPOV[i] == ~0) out->switches[i] = GameControllerSwitchPosition_Center; + else out->switches[i] = state.rgdwPOV[i] * 8 / 36000 + 1; + } + + i = 0; + out->axes[i++] = state.lX / 65535.; + out->axes[i++] = state.lY / 65535.; + out->axes[i++] = state.lZ / 65535.; + out->axes[i++] = state.lRx / 65535.; + out->axes[i++] = state.lRy / 65535.; + out->axes[i++] = state.lRz / 65535.; + out->axes[i++] = state.rglSlider[0] / 65535.; + out->axes[i++] = state.rglSlider[1] / 65535.; + out->axes[i++] = state.lVX / 65535.; + out->axes[i++] = state.lVY / 65535.; + out->axes[i++] = state.lVZ / 65535.; + out->axes[i++] = state.lVRx / 65535.; + out->axes[i++] = state.lVRy / 65535.; + out->axes[i++] = state.lVRz / 65535.; + out->axes[i++] = state.rglVSlider[0] / 65535.; + out->axes[i++] = state.rglVSlider[1] / 65535.; + out->axes[i++] = state.lAX / 65535.; + out->axes[i++] = state.lAY / 65535.; + out->axes[i++] = state.lAZ / 65535.; + out->axes[i++] = state.lARx / 65535.; + out->axes[i++] = state.lARy / 65535.; + out->axes[i++] = state.lARz / 65535.; + out->axes[i++] = state.rglASlider[0] / 65535.; + out->axes[i++] = state.rglASlider[1] / 65535.; + out->axes[i++] = state.lFX / 65535.; + out->axes[i++] = state.lFY / 65535.; + out->axes[i++] = state.lFZ / 65535.; + out->axes[i++] = state.lFRx / 65535.; + out->axes[i++] = state.lFRy / 65535.; + out->axes[i++] = state.lFRz / 65535.; + out->axes[i++] = state.rglFSlider[0] / 65535.; + out->axes[i++] = state.rglFSlider[1] / 65535.; + out->timestamp = GetTickCount64(); + + return S_OK; +} + static const struct IWineGameControllerProviderVtbl wine_provider_vtbl = { wine_provider_QueryInterface, @@ -196,6 +259,7 @@ static const struct IWineGameControllerProviderVtbl wine_provider_vtbl = wine_provider_get_AxisCount, wine_provider_get_ButtonCount, wine_provider_get_SwitchCount, + wine_provider_get_State, }; DEFINE_IINSPECTABLE( game_provider, IGameControllerProvider, struct provider, IWineGameControllerProvider_iface ) @@ -284,6 +348,10 @@ void provider_create( const WCHAR *device_path ) IDirectInput8_Release( dinput ); if (FAILED(hr)) return; + if (FAILED(hr = IDirectInputDevice8_SetCooperativeLevel( dinput_device, 0, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE ))) goto done; + if (FAILED(hr = IDirectInputDevice8_SetDataFormat( dinput_device, &c_dfDIJoystick2 ))) goto done; + if (FAILED(hr = IDirectInputDevice8_Acquire( dinput_device ))) goto done; + if (!(impl = calloc( 1, sizeof(*impl) ))) goto done; impl->IWineGameControllerProvider_iface.lpVtbl = &wine_provider_vtbl; impl->IGameControllerProvider_iface.lpVtbl = &game_provider_vtbl; diff --git a/dlls/windows.gaming.input/provider.idl b/dlls/windows.gaming.input/provider.idl index 19d5643f767..25191078721 100644 --- a/dlls/windows.gaming.input/provider.idl +++ b/dlls/windows.gaming.input/provider.idl @@ -32,6 +32,7 @@ import "windows.gaming.input.custom.idl"; namespace Windows.Gaming.Input.Custom { typedef enum WineGameControllerType WineGameControllerType; + typedef struct WineGameControllerState WineGameControllerState; interface IWineGameControllerProvider; runtimeclass WineGameControllerProvider; @@ -41,6 +42,14 @@ namespace Windows.Gaming.Input.Custom { Gamepad = 1, }; + struct WineGameControllerState + { + UINT64 timestamp; + DOUBLE axes[32]; + BOOLEAN buttons[128]; + Windows.Gaming.Input.GameControllerSwitchPosition switches[4]; + }; + [ uuid(06e58977-7684-4dc5-bad1-cda52a4aa06d) ] @@ -62,6 +71,8 @@ namespace Windows.Gaming.Input.Custom { [propget] HRESULT AxisCount([out, retval] INT32 *value); [propget] HRESULT ButtonCount([out, retval] INT32 *value); [propget] HRESULT SwitchCount([out, retval] INT32 *value); + + [propget] HRESULT State([out, retval] WineGameControllerState *state); } [
1
0
0
0
Rémi Bernon : windows.gaming.input: Return object counts and VID/PID for RawGameController.
by Alexandre Julliard
10 Mar '22
10 Mar '22
Module: wine Branch: master Commit: 5fa86231f726c73406e96133e9f0574a34f56721 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5fa86231f726c73406e96133…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 10 13:05:50 2022 +0100 windows.gaming.input: Return object counts and VID/PID for RawGameController. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.gaming.input/controller.c | 27 ++++++++------ dlls/windows.gaming.input/provider.c | 64 +++++++++++++++++++++++++++++++--- dlls/windows.gaming.input/provider.idl | 3 ++ 3 files changed, 80 insertions(+), 14 deletions(-) diff --git a/dlls/windows.gaming.input/controller.c b/dlls/windows.gaming.input/controller.c index ab0183c7d4f..83e4e167ec9 100644 --- a/dlls/windows.gaming.input/controller.c +++ b/dlls/windows.gaming.input/controller.c @@ -65,6 +65,7 @@ struct controller LONG ref; IGameControllerProvider *provider; + IWineGameControllerProvider *wine_provider; }; static inline struct controller *impl_from_IGameControllerImpl( IGameControllerImpl *iface ) @@ -120,6 +121,8 @@ static ULONG WINAPI controller_Release( IGameControllerImpl *iface ) if (!ref) { + if (impl->wine_provider) + IWineGameControllerProvider_Release( impl->wine_provider ); IGameControllerProvider_Release( impl->provider ); free( impl ); } @@ -157,6 +160,10 @@ static HRESULT WINAPI controller_Initialize( IGameControllerImpl *iface, IGameCo impl->IGameController_outer = outer; IGameControllerProvider_AddRef( (impl->provider = provider) ); + hr = IGameControllerProvider_QueryInterface( provider, &IID_IWineGameControllerProvider, + (void **)&impl->wine_provider ); + if (FAILED(hr)) return hr; + EnterCriticalSection( &controller_cs ); if (SUCCEEDED(hr = init_controllers())) hr = IVector_RawGameController_Append( controllers, &impl->IRawGameController_iface ); @@ -210,14 +217,14 @@ DEFINE_IINSPECTABLE_OUTER( raw_controller, IRawGameController, struct controller static HRESULT WINAPI raw_controller_get_AxisCount( IRawGameController *iface, INT32 *value ) { - FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + struct controller *impl = impl_from_IRawGameController( iface ); + return IWineGameControllerProvider_get_AxisCount( impl->wine_provider, value ); } static HRESULT WINAPI raw_controller_get_ButtonCount( IRawGameController *iface, INT32 *value ) { - FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + struct controller *impl = impl_from_IRawGameController( iface ); + return IWineGameControllerProvider_get_ButtonCount( impl->wine_provider, value ); } static HRESULT WINAPI raw_controller_get_ForceFeedbackMotors( IRawGameController *iface, IVectorView_ForceFeedbackMotor **value ) @@ -228,20 +235,20 @@ static HRESULT WINAPI raw_controller_get_ForceFeedbackMotors( IRawGameController static HRESULT WINAPI raw_controller_get_HardwareProductId( IRawGameController *iface, UINT16 *value ) { - FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + struct controller *impl = impl_from_IRawGameController( iface ); + return IGameControllerProvider_get_HardwareProductId( impl->provider, value ); } static HRESULT WINAPI raw_controller_get_HardwareVendorId( IRawGameController *iface, UINT16 *value ) { - FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + struct controller *impl = impl_from_IRawGameController( iface ); + return IGameControllerProvider_get_HardwareVendorId( impl->provider, value ); } static HRESULT WINAPI raw_controller_get_SwitchCount( IRawGameController *iface, INT32 *value ) { - FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + struct controller *impl = impl_from_IRawGameController( iface ); + return IWineGameControllerProvider_get_SwitchCount( impl->wine_provider, value ); } static HRESULT WINAPI raw_controller_GetButtonLabel( IRawGameController *iface, INT32 index, diff --git a/dlls/windows.gaming.input/provider.c b/dlls/windows.gaming.input/provider.c index 703516ccfe2..7883ec6af68 100644 --- a/dlls/windows.gaming.input/provider.c +++ b/dlls/windows.gaming.input/provider.c @@ -143,6 +143,45 @@ static HRESULT WINAPI wine_provider_get_Type( IWineGameControllerProvider *iface return S_OK; } +static HRESULT WINAPI wine_provider_get_AxisCount( IWineGameControllerProvider *iface, INT32 *value ) +{ + struct provider *impl = impl_from_IWineGameControllerProvider( iface ); + DIDEVCAPS caps = {.dwSize = sizeof(DIDEVCAPS)}; + HRESULT hr; + + TRACE( "iface %p, value %p.\n", iface, value ); + + if (SUCCEEDED(hr = IDirectInputDevice8_GetCapabilities( impl->dinput_device, &caps ))) + *value = caps.dwAxes; + return hr; +} + +static HRESULT WINAPI wine_provider_get_ButtonCount( IWineGameControllerProvider *iface, INT32 *value ) +{ + struct provider *impl = impl_from_IWineGameControllerProvider( iface ); + DIDEVCAPS caps = {.dwSize = sizeof(DIDEVCAPS)}; + HRESULT hr; + + TRACE( "iface %p, value %p.\n", iface, value ); + + if (SUCCEEDED(hr = IDirectInputDevice8_GetCapabilities( impl->dinput_device, &caps ))) + *value = caps.dwButtons; + return hr; +} + +static HRESULT WINAPI wine_provider_get_SwitchCount( IWineGameControllerProvider *iface, INT32 *value ) +{ + struct provider *impl = impl_from_IWineGameControllerProvider( iface ); + DIDEVCAPS caps = {.dwSize = sizeof(DIDEVCAPS)}; + HRESULT hr; + + TRACE( "iface %p, value %p.\n", iface, value ); + + if (SUCCEEDED(hr = IDirectInputDevice8_GetCapabilities( impl->dinput_device, &caps ))) + *value = caps.dwPOVs; + return hr; +} + static const struct IWineGameControllerProviderVtbl wine_provider_vtbl = { wine_provider_QueryInterface, @@ -154,6 +193,9 @@ static const struct IWineGameControllerProviderVtbl wine_provider_vtbl = wine_provider_GetTrustLevel, /* IWineGameControllerProvider methods */ wine_provider_get_Type, + wine_provider_get_AxisCount, + wine_provider_get_ButtonCount, + wine_provider_get_SwitchCount, }; DEFINE_IINSPECTABLE( game_provider, IGameControllerProvider, struct provider, IWineGameControllerProvider_iface ) @@ -166,14 +208,28 @@ static HRESULT WINAPI game_provider_get_FirmwareVersionInfo( IGameControllerProv static HRESULT WINAPI game_provider_get_HardwareProductId( IGameControllerProvider *iface, UINT16 *value ) { - FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + DIPROPDWORD vid_pid = {.diph = {.dwHeaderSize = sizeof(DIPROPHEADER), .dwSize = sizeof(DIPROPDWORD)}}; + struct provider *impl = impl_from_IGameControllerProvider( iface ); + HRESULT hr; + + TRACE( "iface %p, value %p.\n", iface, value ); + + if (SUCCEEDED(hr = IDirectInputDevice8_GetProperty( impl->dinput_device, DIPROP_VIDPID, &vid_pid.diph ))) + *value = HIWORD(vid_pid.dwData); + return hr; } static HRESULT WINAPI game_provider_get_HardwareVendorId( IGameControllerProvider *iface, UINT16 *value ) { - FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + DIPROPDWORD vid_pid = {.diph = {.dwHeaderSize = sizeof(DIPROPHEADER), .dwSize = sizeof(DIPROPDWORD)}}; + struct provider *impl = impl_from_IGameControllerProvider( iface ); + HRESULT hr; + + TRACE( "iface %p, value %p.\n", iface, value ); + + if (SUCCEEDED(hr = IDirectInputDevice8_GetProperty( impl->dinput_device, DIPROP_VIDPID, &vid_pid.diph ))) + *value = LOWORD(vid_pid.dwData); + return hr; } static HRESULT WINAPI game_provider_get_HardwareVersionInfo( IGameControllerProvider *iface, GameControllerVersionInfo *value ) diff --git a/dlls/windows.gaming.input/provider.idl b/dlls/windows.gaming.input/provider.idl index 6af700bb12d..19d5643f767 100644 --- a/dlls/windows.gaming.input/provider.idl +++ b/dlls/windows.gaming.input/provider.idl @@ -59,6 +59,9 @@ namespace Windows.Gaming.Input.Custom { requires Windows.Gaming.Input.Custom.IGameControllerProvider { [propget] HRESULT Type([out, retval] WineGameControllerType *value); + [propget] HRESULT AxisCount([out, retval] INT32 *value); + [propget] HRESULT ButtonCount([out, retval] INT32 *value); + [propget] HRESULT SwitchCount([out, retval] INT32 *value); } [
1
0
0
0
Rémi Bernon : windows.gaming.input: Implement Controller(Added|Removed) event support.
by Alexandre Julliard
10 Mar '22
10 Mar '22
Module: wine Branch: master Commit: 1e9b83a440cf746eb67432687e7718d5b194f5e1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1e9b83a440cf746eb6743268…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 10 13:05:49 2022 +0100 windows.gaming.input: Implement Controller(Added|Removed) event support. Using a generic EventHandler<IInspectable *> implementation. This adds several todo_wine because we currently do not implement custom game controller factories. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/tests/hotplug.c | 21 +++++-- dlls/windows.gaming.input/Makefile.in | 1 + dlls/windows.gaming.input/controller.c | 46 +++++++++------ dlls/windows.gaming.input/event_handlers.c | 89 ++++++++++++++++++++++++++++++ dlls/windows.gaming.input/gamepad.c | 44 +++++++++------ dlls/windows.gaming.input/manager.c | 1 - dlls/windows.gaming.input/private.h | 6 ++ dlls/windows.gaming.input/provider.c | 1 - include/windows.foundation.idl | 1 + 9 files changed, 171 insertions(+), 39 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=1e9b83a440cf746eb674…
1
0
0
0
Rémi Bernon : windows.gaming.input: Implement IGamepadStatics_get_Gamepads.
by Alexandre Julliard
10 Mar '22
10 Mar '22
Module: wine Branch: master Commit: e609c640a261fe4cd9b6044ca1fffc07e9e24299 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e609c640a261fe4cd9b6044c…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 10 13:05:48 2022 +0100 windows.gaming.input: Implement IGamepadStatics_get_Gamepads. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/tests/joystick8.c | 1 + dlls/windows.gaming.input/gamepad.c | 82 ++++++++++++++++++++++++++++++------- 2 files changed, 68 insertions(+), 15 deletions(-) diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c index e74e76482f9..c4cfceeee3e 100644 --- a/dlls/dinput/tests/joystick8.c +++ b/dlls/dinput/tests/joystick8.c @@ -3356,6 +3356,7 @@ static void test_windows_gaming_input(void) ok( hr == S_OK, "get_Gamepads returned %#lx\n", hr ); hr = IVectorView_Gamepad_get_Size( gamepads_view, &size ); ok( hr == S_OK, "get_Size returned %#lx\n", hr ); + todo_wine /* but Wine currently intentionally does */ ok( size == 0, "got size %u\n", size ); IVectorView_Gamepad_Release( gamepads_view ); IGamepadStatics_Release( gamepad_statics ); diff --git a/dlls/windows.gaming.input/gamepad.c b/dlls/windows.gaming.input/gamepad.c index 172ca74e3f6..70c9f4cd792 100644 --- a/dlls/windows.gaming.input/gamepad.c +++ b/dlls/windows.gaming.input/gamepad.c @@ -24,6 +24,36 @@ WINE_DEFAULT_DEBUG_CHANNEL(input); +static CRITICAL_SECTION gamepad_cs; +static CRITICAL_SECTION_DEBUG gamepad_cs_debug = +{ + 0, 0, &gamepad_cs, + { &gamepad_cs_debug.ProcessLocksList, &gamepad_cs_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": gamepad_cs") } +}; +static CRITICAL_SECTION gamepad_cs = { &gamepad_cs_debug, -1, 0, 0, 0, 0 }; + +static IVector_Gamepad *gamepads; + +static HRESULT init_gamepads(void) +{ + static const struct vector_iids iids = + { + .vector = &IID_IVector_Gamepad, + .view = &IID_IVectorView_Gamepad, + .iterable = &IID_IIterable_Gamepad, + .iterator = &IID_IIterator_Gamepad, + }; + HRESULT hr; + + EnterCriticalSection( &gamepad_cs ); + if (gamepads) hr = S_OK; + else hr = vector_create( &iids, (void **)&gamepads ); + LeaveCriticalSection( &gamepad_cs ); + + return hr; +} + struct gamepad { IGameControllerImpl IGameControllerImpl_iface; @@ -118,13 +148,19 @@ static HRESULT WINAPI controller_Initialize( IGameControllerImpl *iface, IGameCo IGameControllerProvider *provider ) { struct gamepad *impl = impl_from_IGameControllerImpl( iface ); + HRESULT hr; TRACE( "iface %p, outer %p, provider %p.\n", iface, outer, provider ); impl->IGameController_outer = outer; IGameControllerProvider_AddRef( (impl->provider = provider) ); - return S_OK; + EnterCriticalSection( &gamepad_cs ); + if (SUCCEEDED(hr = init_gamepads())) + hr = IVector_Gamepad_Append( gamepads, &impl->IGamepad_iface ); + LeaveCriticalSection( &gamepad_cs ); + + return hr; } static const struct IGameControllerImplVtbl controller_vtbl = @@ -341,23 +377,14 @@ static HRESULT WINAPI statics_remove_GamepadRemoved( IGamepadStatics *iface, Eve static HRESULT WINAPI statics_get_Gamepads( IGamepadStatics *iface, IVectorView_Gamepad **value ) { - static const struct vector_iids iids = - { - .vector = &IID_IVector_Gamepad, - .view = &IID_IVectorView_Gamepad, - .iterable = &IID_IIterable_Gamepad, - .iterator = &IID_IIterator_Gamepad, - }; - IVector_Gamepad *gamepads; HRESULT hr; TRACE( "iface %p, value %p.\n", iface, value ); - if (SUCCEEDED(hr = vector_create( &iids, (void **)&gamepads ))) - { + EnterCriticalSection( &gamepad_cs ); + if (SUCCEEDED(hr = init_gamepads())) hr = IVector_Gamepad_GetView( gamepads, value ); - IVector_Gamepad_Release( gamepads ); - } + LeaveCriticalSection( &gamepad_cs ); return hr; } @@ -440,8 +467,33 @@ static HRESULT WINAPI controller_factory_OnGameControllerAdded( ICustomGameContr static HRESULT WINAPI controller_factory_OnGameControllerRemoved( ICustomGameControllerFactory *iface, IGameController *value ) { - FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + IGamepad *gamepad; + BOOLEAN found; + UINT32 index; + HRESULT hr; + + TRACE( "iface %p, value %p.\n", iface, value ); + + if (FAILED(hr = IGameController_QueryInterface( value, &IID_IGamepad, (void **)&gamepad ))) + return hr; + + EnterCriticalSection( &gamepad_cs ); + if (SUCCEEDED(hr = init_gamepads())) + { + if (FAILED(hr = IVector_Gamepad_IndexOf( gamepads, gamepad, &index, &found )) || !found) + WARN( "Could not find gamepad %p, hr %#lx!\n", gamepad, hr ); + else + hr = IVector_Gamepad_RemoveAt( gamepads, index ); + } + LeaveCriticalSection( &gamepad_cs ); + + if (FAILED(hr)) + WARN( "Failed to remove gamepad %p, hr %#lx!\n", gamepad, hr ); + else if (found) + TRACE( "Removed gamepad %p.\n", gamepad ); + IGamepad_Release( gamepad ); + + return S_OK; } static const struct ICustomGameControllerFactoryVtbl controller_factory_vtbl =
1
0
0
0
Rémi Bernon : windows.gaming.input: Implement IRawGameControllerStatics_get_RawGameControllers.
by Alexandre Julliard
10 Mar '22
10 Mar '22
Module: wine Branch: master Commit: 1ca51d33c26786482cfac6f96e433edf15b4782c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1ca51d33c26786482cfac6f9…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 10 13:05:47 2022 +0100 windows.gaming.input: Implement IRawGameControllerStatics_get_RawGameControllers. It is important to add RawGameController instances to the vector in the initialization callback, because some games check the vector, as well as the Gamepad class vector in the OnGameControllerAdded callback. This also removes the OnGameControllerAdded failure case, to avoid leaking controllers that were already added to the controller vector, and instead rely on the OnGameControllerRemoved call to do the cleanup. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/tests/joystick8.c | 9 +--- dlls/windows.gaming.input/controller.c | 82 +++++++++++++++++++++++++++------- dlls/windows.gaming.input/manager.c | 6 +-- 3 files changed, 70 insertions(+), 27 deletions(-) diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c index 2d801aacda2..e74e76482f9 100644 --- a/dlls/dinput/tests/joystick8.c +++ b/dlls/dinput/tests/joystick8.c @@ -3340,17 +3340,10 @@ static void test_windows_gaming_input(void) ok( hr == S_OK, "get_RawGameControllers returned %#lx\n", hr ); hr = IVectorView_RawGameController_get_Size( controllers_view, &size ); ok( hr == S_OK, "get_Size returned %#lx\n", hr ); - todo_wine ok( size == 1, "got size %u\n", size ); hr = IVectorView_RawGameController_GetAt( controllers_view, 0, &raw_controller ); - todo_wine ok( hr == S_OK, "GetAt returned %#lx\n", hr ); IVectorView_RawGameController_Release( controllers_view ); - if (hr != S_OK) - { - IRawGameControllerStatics_Release( controller_statics ); - goto done; - } /* HID gamepads aren't exposed as WGI gamepads on Windows */ @@ -3372,6 +3365,7 @@ static void test_windows_gaming_input(void) check_interface( raw_controller, &IID_IInspectable, TRUE ); check_interface( raw_controller, &IID_IAgileObject, TRUE ); check_interface( raw_controller, &IID_IRawGameController, TRUE ); + todo_wine check_interface( raw_controller, &IID_IRawGameController2, TRUE ); check_interface( raw_controller, &IID_IGameController, TRUE ); check_interface( raw_controller, &IID_IGamepad, FALSE ); @@ -3384,6 +3378,7 @@ static void test_windows_gaming_input(void) check_interface( game_controller, &IID_IInspectable, TRUE ); check_interface( game_controller, &IID_IAgileObject, TRUE ); check_interface( game_controller, &IID_IRawGameController, TRUE ); + todo_wine check_interface( game_controller, &IID_IRawGameController2, TRUE ); check_interface( game_controller, &IID_IGameController, TRUE ); check_interface( game_controller, &IID_IGamepad, FALSE ); diff --git a/dlls/windows.gaming.input/controller.c b/dlls/windows.gaming.input/controller.c index 9fb1b1a69a2..51ede5a0e47 100644 --- a/dlls/windows.gaming.input/controller.c +++ b/dlls/windows.gaming.input/controller.c @@ -24,6 +24,36 @@ WINE_DEFAULT_DEBUG_CHANNEL(input); +static CRITICAL_SECTION controller_cs; +static CRITICAL_SECTION_DEBUG controller_cs_debug = +{ + 0, 0, &controller_cs, + { &controller_cs_debug.ProcessLocksList, &controller_cs_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": controller_cs") } +}; +static CRITICAL_SECTION controller_cs = { &controller_cs_debug, -1, 0, 0, 0, 0 }; + +static IVector_RawGameController *controllers; + +static HRESULT init_controllers(void) +{ + static const struct vector_iids iids = + { + .vector = &IID_IVector_RawGameController, + .view = &IID_IVectorView_RawGameController, + .iterable = &IID_IIterable_RawGameController, + .iterator = &IID_IIterator_RawGameController, + }; + HRESULT hr; + + EnterCriticalSection( &controller_cs ); + if (controllers) hr = S_OK; + else hr = vector_create( &iids, (void **)&controllers ); + LeaveCriticalSection( &controller_cs ); + + return hr; +} + struct controller { IGameControllerImpl IGameControllerImpl_iface; @@ -118,13 +148,19 @@ static HRESULT WINAPI controller_Initialize( IGameControllerImpl *iface, IGameCo IGameControllerProvider *provider ) { struct controller *impl = impl_from_IGameControllerImpl( iface ); + HRESULT hr; TRACE( "iface %p, outer %p, provider %p.\n", iface, outer, provider ); impl->IGameController_outer = outer; IGameControllerProvider_AddRef( (impl->provider = provider) ); - return S_OK; + EnterCriticalSection( &controller_cs ); + if (SUCCEEDED(hr = init_controllers())) + hr = IVector_RawGameController_Append( controllers, &impl->IRawGameController_iface ); + LeaveCriticalSection( &controller_cs ); + + return hr; } static const struct IGameControllerImplVtbl controller_vtbl = @@ -381,23 +417,14 @@ static HRESULT WINAPI statics_remove_RawGameControllerRemoved( IRawGameControlle static HRESULT WINAPI statics_get_RawGameControllers( IRawGameControllerStatics *iface, IVectorView_RawGameController **value ) { - static const struct vector_iids iids = - { - .vector = &IID_IVector_RawGameController, - .view = &IID_IVectorView_RawGameController, - .iterable = &IID_IIterable_RawGameController, - .iterator = &IID_IIterator_RawGameController, - }; - IVector_RawGameController *controllers; HRESULT hr; TRACE( "iface %p, value %p.\n", iface, value ); - if (SUCCEEDED(hr = vector_create( &iids, (void **)&controllers ))) - { + EnterCriticalSection( &controller_cs ); + if (SUCCEEDED(hr = init_controllers())) hr = IVector_RawGameController_GetView( controllers, value ); - IVector_RawGameController_Release( controllers ); - } + LeaveCriticalSection( &controller_cs ); return hr; } @@ -468,8 +495,33 @@ static HRESULT WINAPI controller_factory_OnGameControllerAdded( ICustomGameContr static HRESULT WINAPI controller_factory_OnGameControllerRemoved( ICustomGameControllerFactory *iface, IGameController *value ) { - FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + IRawGameController *controller; + BOOLEAN found; + UINT32 index; + HRESULT hr; + + TRACE( "iface %p, value %p.\n", iface, value ); + + if (FAILED(hr = IGameController_QueryInterface( value, &IID_IRawGameController, (void **)&controller ))) + return hr; + + EnterCriticalSection( &controller_cs ); + if (SUCCEEDED(hr = init_controllers())) + { + if (FAILED(hr = IVector_RawGameController_IndexOf( controllers, controller, &index, &found )) || !found) + WARN( "Could not find controller %p, hr %#lx!\n", controller, hr ); + else + hr = IVector_RawGameController_RemoveAt( controllers, index ); + } + LeaveCriticalSection( &controller_cs ); + + if (FAILED(hr)) + WARN( "Failed to remove controller %p, hr %#lx!\n", controller, hr ); + else if (found) + TRACE( "Removed controller %p.\n", controller ); + IRawGameController_Release( controller ); + + return S_OK; } static const struct ICustomGameControllerFactoryVtbl controller_factory_vtbl = diff --git a/dlls/windows.gaming.input/manager.c b/dlls/windows.gaming.input/manager.c index 489588a68ab..6a8963a1fc4 100644 --- a/dlls/windows.gaming.input/manager.c +++ b/dlls/windows.gaming.input/manager.c @@ -502,11 +502,7 @@ void manager_on_provider_created( IGameControllerProvider *provider ) controller = LIST_ENTRY( entry, struct controller, entry ); hr = ICustomGameControllerFactory_OnGameControllerAdded( controller->factory, &controller->IGameController_iface ); - if (FAILED(hr)) - { - list_remove( &controller->entry ); - IGameController_Release( &controller->IGameController_iface ); - } + if (FAILED(hr)) WARN( "OnGameControllerAdded failed, hr %#lx\n", hr ); if (next == &controller_list) break; }
1
0
0
0
Giovanni Mascellani : mfplat: Properly align system memory buffers.
by Alexandre Julliard
10 Mar '22
10 Mar '22
Module: wine Branch: master Commit: 0ecde5505c7eccd00ff358abc9c1a9687e8fd83d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0ecde5505c7eccd00ff358ab…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Tue Mar 8 16:06:50 2022 +0300 mfplat: Properly align system memory buffers. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/buffer.c | 24 ++++++++++++++++++++++-- dlls/mfplat/tests/mfplat.c | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 3 deletions(-) diff --git a/dlls/mfplat/buffer.c b/dlls/mfplat/buffer.c index a912c61a3ac..1cb84cba944 100644 --- a/dlls/mfplat/buffer.c +++ b/dlls/mfplat/buffer.c @@ -18,6 +18,8 @@ #define COBJMACROS +#include <malloc.h> + #include "mfplat_private.h" #include "rtworkq.h" @@ -171,7 +173,7 @@ static ULONG WINAPI memory_buffer_Release(IMFMediaBuffer *iface) } DeleteCriticalSection(&buffer->cs); free(buffer->_2d.linear_buffer); - free(buffer->data); + _aligned_free(buffer->data); free(buffer); } @@ -1254,8 +1256,26 @@ static const IMFDXGIBufferVtbl dxgi_buffer_vtbl = static HRESULT memory_buffer_init(struct buffer *buffer, DWORD max_length, DWORD alignment, const IMFMediaBufferVtbl *vtbl) { - if (!(buffer->data = calloc(1, ALIGN_SIZE(max_length, alignment)))) + size_t size; + + if (!alignment) alignment = MF_64_BYTE_ALIGNMENT; + alignment++; + + if (alignment & (alignment - 1)) + { + alignment--; + alignment |= alignment >> 1; + alignment |= alignment >> 2; + alignment |= alignment >> 4; + alignment |= alignment >> 8; + alignment |= alignment >> 16; + alignment++; + } + + size = ALIGN_SIZE(max_length, alignment - 1); + if (!(buffer->data = _aligned_malloc(size, alignment))) return E_OUTOFMEMORY; + memset(buffer->data, 0, size); buffer->IMFMediaBuffer_iface.lpVtbl = vtbl; buffer->refcount = 1; diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index f61dbad7ab9..d9c25edaa72 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -2287,8 +2287,25 @@ static void test_system_memory_buffer(void) ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMFMediaBuffer_Release(buffer); +} + +static void test_system_memory_aligned_buffer(void) +{ + static const DWORD alignments[] = + { + MF_16_BYTE_ALIGNMENT, + MF_32_BYTE_ALIGNMENT, + MF_64_BYTE_ALIGNMENT, + MF_128_BYTE_ALIGNMENT, + MF_256_BYTE_ALIGNMENT, + MF_512_BYTE_ALIGNMENT, + }; + IMFMediaBuffer *buffer; + DWORD length, max; + unsigned int i; + BYTE *data; + HRESULT hr; - /* Aligned buffer. */ hr = MFCreateAlignedMemoryBuffer(16, MF_8_BYTE_ALIGNMENT, NULL); ok(FAILED(hr), "Unexpected hr %#lx.\n", hr); @@ -2324,6 +2341,25 @@ static void test_system_memory_buffer(void) ok(hr == S_OK, "Failed to unlock, hr %#lx.\n", hr); IMFMediaBuffer_Release(buffer); + + for (i = 0; i < ARRAY_SIZE(alignments); ++i) + { + hr = MFCreateAlignedMemoryBuffer(200, alignments[i], &buffer); + ok(hr == S_OK, "Failed to create memory buffer, hr %#lx.\n", hr); + + hr = IMFMediaBuffer_Lock(buffer, &data, &max, &length); + ok(hr == S_OK, "Failed to lock, hr %#lx.\n", hr); + ok(max == 200 && !length, "Unexpected length.\n"); + ok(!((uintptr_t)data & alignments[i]), "Data at %p is misaligned.\n", data); + hr = IMFMediaBuffer_Unlock(buffer); + ok(hr == S_OK, "Failed to unlock, hr %#lx.\n", hr); + + IMFMediaBuffer_Release(buffer); + } + + hr = MFCreateAlignedMemoryBuffer(200, 0, &buffer); + ok(hr == S_OK, "Failed to create memory buffer, hr %#lx.\n", hr); + IMFMediaBuffer_Release(buffer); } static void test_sample(void) @@ -7980,6 +8016,7 @@ START_TEST(mfplat) test_file_stream(); test_MFCreateMFByteStreamOnStream(); test_system_memory_buffer(); + test_system_memory_aligned_buffer(); test_source_resolver(); test_MFCreateAsyncResult(); test_allocate_queue();
1
0
0
0
Kevin Puetz : oleaut32: Fix QueryPathOfRegTypeLib minor version comparison.
by Alexandre Julliard
10 Mar '22
10 Mar '22
Module: wine Branch: master Commit: 288a1024b9b78b7c568e3ac1fae081b8bfd2734f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=288a1024b9b78b7c568e3ac1…
Author: Kevin Puetz <PuetzKevinA(a)JohnDeere.com> Date: Sat Feb 19 14:06:21 2022 -0600 oleaut32: Fix QueryPathOfRegTypeLib minor version comparison. A search with wMin != 0xFFFF should match only if the actual version found matches the major and is is >= the minor version requested (preferring an exact match if one is available) Signed-off-by: Kevin Puetz <PuetzKevinA(a)JohnDeere.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/tests/typelib.c | 4 ++-- dlls/oleaut32/typelib.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 4266243c1ba..6bfc50642a4 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -1521,7 +1521,7 @@ cleanup: static BOOL do_typelib_reg_key(GUID *uid, WORD maj, WORD min, DWORD arch, LPCWSTR base, BOOL remove) { static const WCHAR typelibW[] = {'T','y','p','e','l','i','b','\\',0}; - static const WCHAR formatW[] = {'\\','%','u','.','%','u','\\','0','\\','w','i','n','%','u',0}; + static const WCHAR formatW[] = {'\\','%','x','.','%','x','\\','0','\\','w','i','n','%','u',0}; static const WCHAR format2W[] = {'%','s','_','%','u','_','%','u','.','d','l','l',0}; WCHAR buf[128]; HKEY hkey; @@ -1578,7 +1578,7 @@ static void test_QueryPathOfRegTypeLib(DWORD arch) { 3, 1, S_OK, {'f','a','k','e','_','3','_','1','.','d','l','l',0 } }, { 3, 22, S_OK, {'f','a','k','e','_','3','_','3','7','.','d','l','l',0 } }, { 3, 37, S_OK, {'f','a','k','e','_','3','_','3','7','.','d','l','l',0 } }, - { 3, 40, S_OK, {'f','a','k','e','_','3','_','3','7','.','d','l','l',0 } }, + { 3, 40, TYPE_E_LIBNOTREGISTERED, { 0 } }, { 0xffff, 0xffff, S_OK, {'f','a','k','e','_','5','_','3','7','.','d','l','l',0 } }, { 0xffff, 0, TYPE_E_LIBNOTREGISTERED, { 0 } }, { 3, 0xffff, TYPE_E_LIBNOTREGISTERED, { 0 } }, diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index cdc48e9c7fe..7f10bcc968d 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -207,7 +207,7 @@ static BOOL find_typelib_key( REFGUID guid, WORD *wMaj, WORD *wMin ) best_min = v_min; break; /* exact match */ } - if (*wMin != 0xffff && v_min > best_min) best_min = v_min; + if (*wMin != 0xffff && v_min >= *wMin && v_min > best_min) best_min = v_min; } } len = sizeof(key_name);
1
0
0
0
Hans Leidekker : crypt32: Add support for decoding OCSP responses.
by Alexandre Julliard
10 Mar '22
10 Mar '22
Module: wine Branch: master Commit: 3b90b7be75fc96d3c666ff8920327fe4d2484d13 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3b90b7be75fc96d3c666ff89…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Mar 10 14:15:50 2022 +0100 crypt32: Add support for decoding OCSP responses. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/crypt32/decode.c | 93 +++++++++++++++++++++++++++++++++++++++++++++ dlls/crypt32/tests/encode.c | 73 +++++++++++++++++++++++++++++++++++ 2 files changed, 166 insertions(+) diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c index 1550b3d6f85..dde049b3c40 100644 --- a/dlls/crypt32/decode.c +++ b/dlls/crypt32/decode.c @@ -6147,6 +6147,96 @@ static BOOL WINAPI CRYPT_AsnDecodeEccSignature(DWORD dwCertEncodingType, return ret; } +static BOOL CRYPT_AsnDecodeOCSPResponseStatus(const BYTE *pbEncoded, + DWORD cbEncoded, DWORD dwFlags, void *pvStructInfo, DWORD *pcbStructInfo, + DWORD *pcbDecoded) +{ + if (!cbEncoded) + { + SetLastError(CRYPT_E_ASN1_EOD); + return FALSE; + } + if (pbEncoded[0] != ASN_ENUMERATED) + { + SetLastError(CRYPT_E_ASN1_BADTAG); + return FALSE; + } + + return CRYPT_AsnDecodeIntInternal(pbEncoded, cbEncoded, dwFlags, pvStructInfo, + pcbStructInfo, pcbDecoded); +} + +static BOOL CRYPT_AsnDecodeOCSPResponseBytes(const BYTE *pbEncoded, + DWORD cbEncoded, DWORD dwFlags, void *pvStructInfo, DWORD *pcbStructInfo, + DWORD *pcbDecoded) +{ + DWORD dataLen; + BOOL ret; + + if (!cbEncoded) + { + SetLastError(CRYPT_E_ASN1_EOD); + return FALSE; + } + if (pbEncoded[0] != (ASN_CONTEXT | ASN_CONSTRUCTOR)) + { + SetLastError(CRYPT_E_ASN1_BADTAG); + return FALSE; + } + + if ((ret = CRYPT_GetLen(pbEncoded, cbEncoded, &dataLen))) + { + struct AsnDecodeSequenceItem items[] = { + { ASN_OBJECTIDENTIFIER, 0, + CRYPT_AsnDecodeOidIgnoreTag, sizeof(LPSTR), FALSE, TRUE, + 0, 0 }, + { ASN_OCTETSTRING, sizeof(LPSTR), + CRYPT_AsnDecodeOctets, sizeof(CRYPT_OBJID_BLOB), FALSE, TRUE, + sizeof(LPSTR) + offsetof(CRYPT_OBJID_BLOB, pbData), 0 }, + }; + BYTE lenBytes = GET_LEN_BYTES(pbEncoded[1]); + DWORD bytesNeeded; + + if (dataLen) + { + ret = CRYPT_AsnDecodeSequence(items, ARRAY_SIZE(items), + pbEncoded + 1 + lenBytes, cbEncoded - 1 - lenBytes, dwFlags, NULL, + pvStructInfo, pcbStructInfo, &bytesNeeded, NULL); + if (ret) *pcbDecoded = bytesNeeded + lenBytes + 1; + } + } + return ret; +} + +static BOOL WINAPI CRYPT_AsnDecodeOCSPResponse(DWORD dwCertEncodingType, + LPCSTR lpszStructType, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, + CRYPT_DECODE_PARA *pDecodePara, void *pvStructInfo, DWORD *pcbStructInfo) +{ + BOOL ret; + struct AsnDecodeSequenceItem items[] = { + { ASN_ENUMERATED, offsetof(OCSP_RESPONSE_INFO, dwStatus), + CRYPT_AsnDecodeOCSPResponseStatus, sizeof(DWORD), FALSE, FALSE, + 0, 0 }, + { ASN_CONTEXT | ASN_CONSTRUCTOR, offsetof(OCSP_RESPONSE_INFO, pszObjId), + CRYPT_AsnDecodeOCSPResponseBytes, sizeof(LPSTR) + sizeof(CRYPT_OBJID_BLOB), TRUE, TRUE, + offsetof(OCSP_RESPONSE_INFO, pszObjId), 0 }, + }; + + __TRY + { + ret = CRYPT_AsnDecodeSequence(items, ARRAY_SIZE(items), + pbEncoded, cbEncoded, dwFlags, pDecodePara, pvStructInfo, + pcbStructInfo, NULL, NULL); + } + __EXCEPT_PAGE_FAULT + { + SetLastError(STATUS_ACCESS_VIOLATION); + ret = FALSE; + } + __ENDTRY + return ret; +} + static CryptDecodeObjectExFunc CRYPT_GetBuiltinDecoder(DWORD dwCertEncodingType, LPCSTR lpszStructType) { @@ -6295,6 +6385,9 @@ static CryptDecodeObjectExFunc CRYPT_GetBuiltinDecoder(DWORD dwCertEncodingType, case LOWORD(CNG_RSA_PUBLIC_KEY_BLOB): decodeFunc = CRYPT_AsnDecodeRsaPubKey_Bcrypt; break; + case LOWORD(OCSP_RESPONSE): + decodeFunc = CRYPT_AsnDecodeOCSPResponse; + break; default: FIXME("Unimplemented decoder for lpszStructType OID %d\n", LOWORD(lpszStructType)); } diff --git a/dlls/crypt32/tests/encode.c b/dlls/crypt32/tests/encode.c index c47fd823673..11840d817fe 100644 --- a/dlls/crypt32/tests/encode.c +++ b/dlls/crypt32/tests/encode.c @@ -8760,6 +8760,78 @@ static void test_encodeOCSPRequestInfo(DWORD dwEncoding) LocalFree(buf); } +static const BYTE ocsp_response[] = { + 0x30, 0x03, 0x0a, 0x01, 0x06 +}; + +static const BYTE ocsp_response2[] = { + 0x30, 0x82, 0x01, 0xd3, 0x0a, 0x01, 0x00, 0xa0, 0x82, 0x01, 0xcc, 0x30, + 0x82, 0x01, 0xc8, 0x06, 0x09, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, + 0x01, 0x01, 0x04, 0x82, 0x01, 0xb9, 0x30, 0x82, 0x01, 0xb5, 0x30, 0x81, + 0x9e, 0xa2, 0x16, 0x04, 0x14, 0xb7, 0x6b, 0xa2, 0xea, 0xa8, 0xaa, 0x84, + 0x8c, 0x79, 0xea, 0xb4, 0xda, 0x0f, 0x98, 0xb2, 0xc5, 0x95, 0x76, 0xb9, + 0xf4, 0x18, 0x0f, 0x32, 0x30, 0x32, 0x32, 0x30, 0x33, 0x30, 0x37, 0x31, + 0x38, 0x33, 0x36, 0x34, 0x33, 0x5a, 0x30, 0x73, 0x30, 0x71, 0x30, 0x49, + 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, + 0x14, 0xe4, 0xe3, 0x95, 0xa2, 0x29, 0xd3, 0xd4, 0xc1, 0xc3, 0x1f, 0xf0, + 0x98, 0x0c, 0x0b, 0x4e, 0xc0, 0x09, 0x8a, 0xab, 0xd8, 0x04, 0x14, 0xb7, + 0x6b, 0xa2, 0xea, 0xa8, 0xaa, 0x84, 0x8c, 0x79, 0xea, 0xb4, 0xda, 0x0f, + 0x98, 0xb2, 0xc5, 0x95, 0x76, 0xb9, 0xf4, 0x02, 0x10, 0x08, 0x49, 0x8f, + 0x6d, 0xd9, 0xef, 0xfb, 0x40, 0x55, 0x1e, 0xac, 0x54, 0x54, 0x87, 0xc1, + 0xb1, 0x80, 0x00, 0x18, 0x0f, 0x32, 0x30, 0x32, 0x32, 0x30, 0x33, 0x30, + 0x37, 0x31, 0x38, 0x32, 0x31, 0x30, 0x31, 0x5a, 0xa0, 0x11, 0x18, 0x0f, + 0x32, 0x30, 0x32, 0x32, 0x30, 0x33, 0x31, 0x34, 0x31, 0x37, 0x33, 0x36, + 0x30, 0x31, 0x5a, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, + 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x2a, + 0xf3, 0x5f, 0xf7, 0x72, 0x6b, 0x27, 0x38, 0x6b, 0xae, 0x66, 0x42, 0xe0, + 0x3b, 0xc6, 0x44, 0x5f, 0x95, 0xe2, 0x1f, 0xbc, 0x3f, 0xb3, 0x1d, 0x6c, + 0x6c, 0x7c, 0x91, 0xb3, 0x02, 0x23, 0x0f, 0xf0, 0x13, 0x5f, 0x62, 0x92, + 0x0d, 0x91, 0xa9, 0x8f, 0x66, 0xe9, 0x18, 0xe3, 0xb1, 0xe0, 0x4c, 0x63, + 0x40, 0x9e, 0x14, 0x26, 0x28, 0x7a, 0x5e, 0x51, 0x99, 0x43, 0x1c, 0xd5, + 0xbd, 0x84, 0x88, 0x68, 0xd9, 0x0e, 0xd9, 0xf4, 0x78, 0x48, 0x9f, 0x01, + 0x4c, 0x34, 0x14, 0x1e, 0x7c, 0x72, 0x9c, 0xdd, 0x94, 0xcb, 0x6e, 0x28, + 0xf5, 0x76, 0x75, 0xa2, 0xbe, 0x4b, 0x52, 0xac, 0x38, 0x9d, 0xce, 0x52, + 0x68, 0x33, 0xbc, 0x52, 0xc7, 0xdc, 0x2f, 0x19, 0xff, 0x15, 0x9c, 0x4b, + 0xdb, 0x83, 0x4e, 0xd7, 0xf6, 0x9b, 0x7f, 0x76, 0x58, 0xa5, 0x46, 0x49, + 0xe3, 0x2d, 0x41, 0x26, 0xf8, 0xce, 0xb7, 0x56, 0x61, 0xb2, 0x88, 0x65, + 0x2b, 0xb8, 0x4d, 0xf2, 0xf2, 0x32, 0x50, 0x53, 0x8b, 0x0d, 0xc6, 0x58, + 0xac, 0xd8, 0xe4, 0x8d, 0x38, 0x9e, 0x61, 0xeb, 0x6b, 0xd2, 0xd6, 0x50, + 0x8d, 0xfa, 0x93, 0x47, 0x4e, 0x6e, 0x2b, 0xd3, 0xb9, 0xdc, 0xb9, 0xb5, + 0x86, 0x46, 0xcb, 0xda, 0xd9, 0xd8, 0xd5, 0x99, 0x7a, 0x7c, 0x73, 0xee, + 0xc1, 0x52, 0x8e, 0xc5, 0xca, 0x28, 0x1d, 0x15, 0x94, 0x06, 0xa0, 0xa5, + 0x01, 0xf3, 0xbd, 0x67, 0x3f, 0x3d, 0x46, 0x63, 0xc5, 0xba, 0xd5, 0x12, + 0xde, 0xb4, 0xc5, 0x86, 0xfe, 0x97, 0x6b, 0x70, 0xfe, 0xa4, 0x6a, 0x25, + 0x63, 0x8e, 0xcf, 0xa4, 0x13, 0x1c, 0x2b, 0xf7, 0xf4, 0xc9, 0x79, 0x8e, + 0x07, 0xa3, 0x25, 0x9f, 0xcf, 0x33, 0x65, 0x49, 0x84, 0xad, 0x7f, 0x90, + 0x44, 0x85, 0xd8, 0xa7, 0x73, 0x53, 0x56, 0x73, 0xca, 0x15, 0x39, 0x99, + 0x5f, 0x39, 0xfd +}; + +static void test_decodeOCSPResponseInfo(DWORD dwEncoding) +{ + OCSP_RESPONSE_INFO *info; + DWORD size; + BOOL ret; + + ret = pCryptDecodeObjectEx(dwEncoding, OCSP_RESPONSE, ocsp_response, sizeof(ocsp_response), + CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); + ok(ret, "got %08lx\n", GetLastError()); + ok(info->dwStatus == OCSP_UNAUTHORIZED_RESPONSE, "got %lu\n", info->dwStatus); + ok(info->pszObjId == NULL, "got %s\n", wine_dbgstr_a(info->pszObjId)); + ok(!info->Value.cbData, "got %lu\n", info->Value.cbData); + ok(info->Value.pbData == NULL, "got %p\n", info->Value.pbData); + LocalFree(info); + + ret = pCryptDecodeObjectEx(dwEncoding, OCSP_RESPONSE, ocsp_response2, sizeof(ocsp_response2), + CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size); + ok(ret, "got %08lx\n", GetLastError()); + ok(info->dwStatus == OCSP_SUCCESSFUL_RESPONSE, "got %lu\n", info->dwStatus); + ok(!strcmp(info->pszObjId, szOID_PKIX_OCSP_BASIC_SIGNED_RESPONSE), "got %s\n", wine_dbgstr_a(info->pszObjId)); + ok(info->Value.cbData == 441, "got %lu\n", info->Value.cbData); + ok(info->Value.pbData != NULL, "got %p\n", info->Value.pbData); + LocalFree(info); +} + START_TEST(encode) { static const DWORD encodings[] = { X509_ASN_ENCODING, PKCS_7_ASN_ENCODING, @@ -8854,6 +8926,7 @@ START_TEST(encode) test_decodeCertPolicyConstraints(encodings[i]); test_decodeRsaPrivateKey(encodings[i]); test_encodeOCSPRequestInfo(encodings[i]); + test_decodeOCSPResponseInfo(encodings[i]); } testPortPublicKeyInfo(); }
1
0
0
0
← Newer
1
...
64
65
66
67
68
69
70
...
114
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Results per page:
10
25
50
100
200