Wine-devel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 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
October 2021
- 81 participants
- 772 discussions
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51784
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
The first two patches aren't really solving the mentionned bug but they
should help. At least they prevent this series from overflowing.
dlls/dinput8/tests/hid.c | 498 +++++++++++++++++++--------------------
1 file changed, 249 insertions(+), 249 deletions(-)
diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c
index f4e180a85f3..466331b326b 100644
--- a/dlls/dinput8/tests/hid.c
+++ b/dlls/dinput8/tests/hid.c
@@ -3735,7 +3735,7 @@ static void test_simple_joystick(void)
}
hr = IDirectInput8_EnumDevices( di, DI8DEVCLASS_ALL, find_test_device, &devinst, DIEDFL_ALLDEVICES );
- ok( hr == DI_OK, "IDirectInput8_EnumDevices returned: %#x\n", hr );
+ ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr );
if (!IsEqualGUID( &devinst.guidProduct, &expect_guid_product ))
{
win_skip( "device not found, skipping tests\n" );
@@ -3755,62 +3755,62 @@ static void test_simple_joystick(void)
check_member( devinst, expect_devinst, "%04x", wUsage );
hr = IDirectInput8_CreateDevice( di, &devinst.guidInstance, NULL, NULL );
- ok( hr == E_POINTER, "IDirectInput8_CreateDevice returned %#x\n", hr );
+ ok( hr == E_POINTER, "CreateDevice returned %#x\n", hr );
hr = IDirectInput8_CreateDevice( di, NULL, &device, NULL );
- ok( hr == E_POINTER, "IDirectInput8_CreateDevice returned %#x\n", hr );
+ ok( hr == E_POINTER, "CreateDevice returned %#x\n", hr );
hr = IDirectInput8_CreateDevice( di, &GUID_NULL, &device, NULL );
- ok( hr == DIERR_DEVICENOTREG, "IDirectInput8_CreateDevice returned %#x\n", hr );
+ ok( hr == DIERR_DEVICENOTREG, "CreateDevice returned %#x\n", hr );
hr = IDirectInput8_CreateDevice( di, &devinst.guidInstance, &device, NULL );
- ok( hr == DI_OK, "IDirectInput8_CreateDevice returned %#x\n", hr );
+ ok( hr == DI_OK, "CreateDevice returned %#x\n", hr );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_VIDPID, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_VIDPID returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_VIDPID returned %#x\n", hr );
/* Wine may get the wrong device here, because the test driver creates another instance of
hidclass.sys, and gets duplicate rawinput handles, which we use in the guidInstance */
todo_wine_if( prop_dword.dwData != EXPECT_VIDPID )
ok( prop_dword.dwData == EXPECT_VIDPID, "got %#x expected %#x\n", prop_dword.dwData, EXPECT_VIDPID );
ref = IDirectInputDevice8_Release( device );
- ok( ref == 0, "IDirectInputDeviceW_Release returned %d\n", ref );
+ ok( ref == 0, "Release returned %d\n", ref );
hr = IDirectInput8_CreateDevice( di, &expect_guid_product, &device, NULL );
- ok( hr == DI_OK, "IDirectInput8_CreateDevice returned %#x\n", hr );
+ ok( hr == DI_OK, "CreateDevice returned %#x\n", hr );
hr = IDirectInputDevice8_Initialize( device, instance, 0x0700, &GUID_NULL );
todo_wine
- ok( hr == DIERR_BETADIRECTINPUTVERSION, "IDirectInputDevice8_Initialize returned %#x\n", hr );
+ ok( hr == DIERR_BETADIRECTINPUTVERSION, "Initialize returned %#x\n", hr );
hr = IDirectInputDevice8_Initialize( device, instance, DIRECTINPUT_VERSION, NULL );
todo_wine
- ok( hr == E_POINTER, "IDirectInputDevice8_Initialize returned %#x\n", hr );
+ ok( hr == E_POINTER, "Initialize returned %#x\n", hr );
hr = IDirectInputDevice8_Initialize( device, NULL, DIRECTINPUT_VERSION, &GUID_NULL );
todo_wine
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_Initialize returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "Initialize returned %#x\n", hr );
hr = IDirectInputDevice8_Initialize( device, instance, DIRECTINPUT_VERSION, &GUID_NULL );
todo_wine
- ok( hr == REGDB_E_CLASSNOTREG, "IDirectInputDevice8_Initialize returned %#x\n", hr );
+ ok( hr == REGDB_E_CLASSNOTREG, "Initialize returned %#x\n", hr );
hr = IDirectInputDevice8_Initialize( device, instance, DIRECTINPUT_VERSION, &devinst.guidInstance );
- ok( hr == DI_OK, "IDirectInputDevice8_Initialize returned %#x\n", hr );
+ ok( hr == DI_OK, "Initialize returned %#x\n", hr );
guid = devinst.guidInstance;
memset( &devinst, 0, sizeof(devinst) );
devinst.dwSize = sizeof(DIDEVICEINSTANCEW);
hr = IDirectInputDevice8_GetDeviceInfo( device, &devinst );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceInfo returned %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceInfo returned %#x\n", hr );
ok( IsEqualGUID( &guid, &devinst.guidInstance ), "got %s expected %s\n", debugstr_guid( &guid ),
debugstr_guid( &devinst.guidInstance ) );
hr = IDirectInputDevice8_Initialize( device, instance, DIRECTINPUT_VERSION, &devinst.guidProduct );
- ok( hr == DI_OK, "IDirectInputDevice8_Initialize returned %#x\n", hr );
+ ok( hr == DI_OK, "Initialize returned %#x\n", hr );
hr = IDirectInputDevice8_GetDeviceInfo( device, NULL );
- ok( hr == E_POINTER, "IDirectInputDevice8_GetDeviceInfo returned %#x\n", hr );
+ ok( hr == E_POINTER, "GetDeviceInfo returned %#x\n", hr );
devinst.dwSize = sizeof(DIDEVICEINSTANCEW) + 1;
hr = IDirectInputDevice8_GetDeviceInfo( device, &devinst );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_GetDeviceInfo returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "GetDeviceInfo returned %#x\n", hr );
devinst.dwSize = sizeof(DIDEVICEINSTANCE_DX3W);
hr = IDirectInputDevice8_GetDeviceInfo( device, &devinst );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceInfo returned %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceInfo returned %#x\n", hr );
todo_wine
check_member_guid( devinst, expect_devinst, guidInstance );
check_member_guid( devinst, expect_devinst, guidProduct );
@@ -3823,7 +3823,7 @@ static void test_simple_joystick(void)
memset( &devinst, 0, sizeof(devinst) );
devinst.dwSize = sizeof(DIDEVICEINSTANCEW);
hr = IDirectInputDevice8_GetDeviceInfo( device, &devinst );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceInfo returned %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceInfo returned %#x\n", hr );
check_member( devinst, expect_devinst, "%d", dwSize );
todo_wine
check_member_guid( devinst, expect_devinst, guidInstance );
@@ -3838,13 +3838,13 @@ static void test_simple_joystick(void)
check_member( devinst, expect_devinst, "%04x", wUsage );
hr = IDirectInputDevice8_GetCapabilities( device, NULL );
- ok( hr == E_POINTER, "IDirectInputDevice8_GetCapabilities returned %#x\n", hr );
+ ok( hr == E_POINTER, "GetCapabilities returned %#x\n", hr );
hr = IDirectInputDevice8_GetCapabilities( device, &caps );
todo_wine
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_GetCapabilities returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "GetCapabilities returned %#x\n", hr );
caps.dwSize = sizeof(DIDEVCAPS);
hr = IDirectInputDevice8_GetCapabilities( device, &caps );
- ok( hr == DI_OK, "IDirectInputDevice8_GetCapabilities returned %#x\n", hr );
+ ok( hr == DI_OK, "GetCapabilities returned %#x\n", hr );
check_member( caps, expect_caps, "%d", dwSize );
check_member( caps, expect_caps, "%#x", dwFlags );
check_member( caps, expect_caps, "%#x", dwDevType );
@@ -3858,25 +3858,25 @@ static void test_simple_joystick(void)
check_member( caps, expect_caps, "%d", dwFFDriverVersion );
hr = IDirectInputDevice8_GetProperty( device, NULL, NULL );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_GetProperty returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "GetProperty returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, &GUID_NULL, NULL );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_GetProperty returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "GetProperty returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_VIDPID, NULL );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_GetProperty returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "GetProperty returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_VIDPID, &prop_string.diph );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_GetProperty returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "GetProperty returned %#x\n", hr );
prop_dword.diph.dwHeaderSize = sizeof(DIPROPHEADER) - 1;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_VIDPID, &prop_dword.diph );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_GetProperty returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "GetProperty returned %#x\n", hr );
prop_dword.diph.dwHeaderSize = sizeof(DIPROPHEADER);
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_VIDPID, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_VIDPID returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_VIDPID returned %#x\n", hr );
ok( prop_dword.dwData == EXPECT_VIDPID, "got %#x expected %#x\n", prop_dword.dwData, EXPECT_VIDPID );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_GUIDANDPATH, &prop_guid_path.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_GUIDANDPATH returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_GUIDANDPATH returned %#x\n", hr );
todo_wine
ok( IsEqualGUID( &prop_guid_path.guidClass, &GUID_DEVCLASS_HIDCLASS ), "got guid %s\n",
debugstr_guid( &prop_guid_path.guidClass ) );
@@ -3892,77 +3892,77 @@ static void test_simple_joystick(void)
}
hr = IDirectInputDevice8_GetProperty( device, DIPROP_INSTANCENAME, &prop_string.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_INSTANCENAME returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_INSTANCENAME returned %#x\n", hr );
todo_wine
ok( !wcscmp( prop_string.wsz, expect_devinst.tszInstanceName ), "got instance %s\n",
debugstr_w(prop_string.wsz) );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_PRODUCTNAME, &prop_string.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_PRODUCTNAME returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_PRODUCTNAME returned %#x\n", hr );
todo_wine
ok( !wcscmp( prop_string.wsz, expect_devinst.tszProductName ), "got product %s\n",
debugstr_w(prop_string.wsz) );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_TYPENAME, &prop_string.diph );
todo_wine
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_TYPENAME returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_TYPENAME returned %#x\n", hr );
todo_wine
ok( !wcscmp( prop_string.wsz, expect_vidpid_str ), "got type %s\n", debugstr_w(prop_string.wsz) );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_USERNAME, &prop_string.diph );
- ok( hr == S_FALSE, "IDirectInputDevice8_GetProperty DIPROP_USERNAME returned %#x\n", hr );
+ ok( hr == S_FALSE, "GetProperty DIPROP_USERNAME returned %#x\n", hr );
todo_wine
ok( !wcscmp( prop_string.wsz, L"" ), "got user %s\n", debugstr_w(prop_string.wsz) );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_JOYSTICKID, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_JOYSTICKID returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_JOYSTICKID returned %#x\n", hr );
todo_wine
ok( prop_dword.dwData == 0, "got %#x expected %#x\n", prop_dword.dwData, 0 );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_AXISMODE, &prop_dword.diph );
todo_wine
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_AXISMODE returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_AXISMODE returned %#x\n", hr );
todo_wine
ok( prop_dword.dwData == DIPROPAXISMODE_ABS, "got %u expected %u\n", prop_dword.dwData, DIPROPAXISMODE_ABS );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_BUFFERSIZE, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_BUFFERSIZE returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_BUFFERSIZE returned %#x\n", hr );
ok( prop_dword.dwData == 0, "got %#x expected %#x\n", prop_dword.dwData, 0 );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFGAIN, &prop_dword.diph );
todo_wine
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_FFGAIN returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_FFGAIN returned %#x\n", hr );
todo_wine
ok( prop_dword.dwData == 10000, "got %u expected %u\n", prop_dword.dwData, 10000 );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_CALIBRATION, &prop_dword.diph );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_GetProperty DIPROP_CALIBRATION returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "GetProperty DIPROP_CALIBRATION returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_AUTOCENTER, &prop_dword.diph );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_GetProperty DIPROP_AUTOCENTER returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_AUTOCENTER returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_DEADZONE, &prop_dword.diph );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_GetProperty DIPROP_DEADZONE returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_DEADZONE returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
todo_wine
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_GetProperty DIPROP_FFLOAD returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_FFLOAD returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_GRANULARITY, &prop_dword.diph );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_GetProperty DIPROP_GRANULARITY returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_GRANULARITY returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_SATURATION, &prop_dword.diph );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_GetProperty DIPROP_SATURATION returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_SATURATION returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_RANGE, &prop_range.diph );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_GetProperty DIPROP_RANGE returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_RANGE 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 = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_DEADZONE, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_DEADZONE returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_DEADZONE returned %#x\n", hr );
ok( prop_dword.dwData == 0, "got %u expected %u\n", prop_dword.dwData, 0 );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_GRANULARITY, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_GRANULARITY returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_GRANULARITY returned %#x\n", hr );
ok( prop_dword.dwData == 1, "got %u expected %u\n", prop_dword.dwData, 1 );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_SATURATION, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_SATURATION returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_SATURATION returned %#x\n", hr );
ok( prop_dword.dwData == 10000, "got %u expected %u\n", prop_dword.dwData, 10000 );
prop_range.diph.dwHow = DIPH_BYUSAGE;
@@ -3970,18 +3970,18 @@ static void test_simple_joystick(void)
prop_range.lMin = 0xdeadbeef;
prop_range.lMax = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_RANGE, &prop_range.diph );
- ok( hr == DIERR_NOTFOUND, "IDirectInputDevice8_GetProperty DIPROP_RANGE returned %#x\n", hr );
+ ok( hr == DIERR_NOTFOUND, "GetProperty DIPROP_RANGE returned %#x\n", hr );
prop_range.diph.dwObj = MAKELONG( 0, HID_USAGE_PAGE_GENERIC );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_RANGE, &prop_range.diph );
- ok( hr == DIERR_NOTFOUND, "IDirectInputDevice8_GetProperty DIPROP_RANGE returned %#x\n", hr );
+ ok( hr == DIERR_NOTFOUND, "GetProperty DIPROP_RANGE returned %#x\n", hr );
prop_range.diph.dwObj = MAKELONG( HID_USAGE_PAGE_GENERIC, HID_USAGE_GENERIC_X );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_RANGE, &prop_range.diph );
- ok( hr == DIERR_NOTFOUND, "IDirectInputDevice8_GetProperty DIPROP_RANGE returned %#x\n", hr );
+ ok( hr == DIERR_NOTFOUND, "GetProperty DIPROP_RANGE returned %#x\n", hr );
prop_range.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
prop_range.lMin = 0xdeadbeef;
prop_range.lMax = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_RANGE, &prop_range.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_RANGE returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_RANGE returned %#x\n", hr );
ok( prop_range.lMin == 0, "got %d expected %d\n", prop_range.lMin, 0 );
ok( prop_range.lMax == 65535, "got %d expected %d\n", prop_range.lMax, 65535 );
@@ -3989,35 +3989,35 @@ static void test_simple_joystick(void)
prop_pointer.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_APPDATA, &prop_pointer.diph );
todo_wine
- ok( hr == DIERR_NOTINITIALIZED, "IDirectInputDevice8_GetProperty DIPROP_APPDATA returned %#x\n", hr );
+ ok( hr == DIERR_NOTINITIALIZED, "GetProperty DIPROP_APPDATA returned %#x\n", hr );
hr = IDirectInputDevice8_EnumObjects( device, NULL, NULL, DIDFT_ALL );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_EnumObjects returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "EnumObjects returned %#x\n", hr );
hr = IDirectInputDevice8_EnumObjects( device, check_object_count, &res, 0x20 );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_EnumObjects returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "EnumObjects returned %#x\n", hr );
res = 0;
hr = IDirectInputDevice8_EnumObjects( device, check_object_count, &res, DIDFT_AXIS | DIDFT_PSHBUTTON );
- ok( hr == DI_OK, "IDirectInputDevice8_EnumObjects returned %#x\n", hr );
+ ok( hr == DI_OK, "EnumObjects returned %#x\n", hr );
ok( res == 5, "got %u expected %u\n", res, 5 );
hr = IDirectInputDevice8_EnumObjects( device, check_objects, &check_objects_params, DIDFT_ALL );
- ok( hr == DI_OK, "IDirectInputDevice8_EnumObjects returned %#x\n", hr );
+ ok( hr == DI_OK, "EnumObjects returned %#x\n", hr );
ok( check_objects_params.index >= check_objects_params.expect_count, "missing %u objects\n",
check_objects_params.expect_count - check_objects_params.index );
hr = IDirectInputDevice8_GetObjectInfo( device, NULL, 0, DIPH_DEVICE );
- ok( hr == E_POINTER, "IDirectInputDevice8_GetObjectInfo returned: %#x\n", hr );
+ ok( hr == E_POINTER, "GetObjectInfo returned: %#x\n", hr );
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, 0, DIPH_DEVICE );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_GetObjectInfo returned: %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "GetObjectInfo returned: %#x\n", hr );
objinst.dwSize = sizeof(DIDEVICEOBJECTINSTANCEW);
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, 0, DIPH_DEVICE );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_GetObjectInfo returned: %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "GetObjectInfo returned: %#x\n", hr );
res = MAKELONG( HID_USAGE_GENERIC_Z, HID_USAGE_PAGE_GENERIC );
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, res, DIPH_BYUSAGE );
- ok( hr == DIERR_NOTFOUND, "IDirectInputDevice8_GetObjectInfo returned: %#x\n", hr );
+ ok( hr == DIERR_NOTFOUND, "GetObjectInfo returned: %#x\n", hr );
res = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, res, DIPH_BYUSAGE );
- ok( hr == DI_OK, "IDirectInputDevice8_GetObjectInfo returned: %#x\n", hr );
+ ok( hr == DI_OK, "GetObjectInfo returned: %#x\n", hr );
check_member( objinst, expect_objects[1], "%u", dwSize );
check_member_guid( objinst, expect_objects[1], guidType );
@@ -4036,15 +4036,15 @@ static void test_simple_joystick(void)
check_member( objinst, expect_objects[1], "%u", wReportId );
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, 0x14, DIPH_BYOFFSET );
- ok( hr == DIERR_NOTFOUND, "IDirectInputDevice8_GetObjectInfo returned: %#x\n", hr );
+ ok( hr == DIERR_NOTFOUND, "GetObjectInfo returned: %#x\n", hr );
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, 0, DIPH_BYOFFSET );
- ok( hr == DIERR_NOTFOUND, "IDirectInputDevice8_GetObjectInfo returned: %#x\n", hr );
+ ok( hr == DIERR_NOTFOUND, "GetObjectInfo returned: %#x\n", hr );
res = DIDFT_PSHBUTTON | DIDFT_MAKEINSTANCE( 3 );
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, res, DIPH_BYID );
- ok( hr == DIERR_NOTFOUND, "IDirectInputDevice8_GetObjectInfo returned: %#x\n", hr );
+ ok( hr == DIERR_NOTFOUND, "GetObjectInfo returned: %#x\n", hr );
res = DIDFT_PSHBUTTON | DIDFT_MAKEINSTANCE( 1 );
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, res, DIPH_BYID );
- ok( hr == DI_OK, "IDirectInputDevice8_GetObjectInfo returned: %#x\n", hr );
+ ok( hr == DI_OK, "GetObjectInfo returned: %#x\n", hr );
check_member( objinst, expect_objects[5], "%u", dwSize );
check_member_guid( objinst, expect_objects[5], guidType );
@@ -4063,46 +4063,46 @@ static void test_simple_joystick(void)
check_member( objinst, expect_objects[5], "%u", wReportId );
hr = IDirectInputDevice8_EnumEffects( device, NULL, NULL, DIEFT_ALL );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_EnumEffects returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "EnumEffects returned %#x\n", hr );
res = 0;
hr = IDirectInputDevice8_EnumEffects( device, check_effect_count, &res, 0xfe );
- ok( hr == DI_OK, "IDirectInputDevice8_EnumEffects returned %#x\n", hr );
+ ok( hr == DI_OK, "EnumEffects returned %#x\n", hr );
ok( res == 0, "got %u expected %u\n", res, 0 );
res = 0;
hr = IDirectInputDevice8_EnumEffects( device, check_effect_count, &res, DIEFT_PERIODIC );
- ok( hr == DI_OK, "IDirectInputDevice8_EnumEffects returned %#x\n", hr );
+ ok( hr == DI_OK, "EnumEffects returned %#x\n", hr );
ok( res == 0, "got %u expected %u\n", res, 0 );
hr = IDirectInputDevice8_EnumEffects( device, check_effects, &check_effects_params, DIEFT_ALL );
- ok( hr == DI_OK, "IDirectInputDevice8_EnumEffects returned %#x\n", hr );
+ ok( hr == DI_OK, "EnumEffects returned %#x\n", hr );
ok( check_effects_params.index >= check_effects_params.expect_count, "missing %u effects\n",
check_effects_params.expect_count - check_effects_params.index );
hr = IDirectInputDevice8_GetEffectInfo( device, NULL, &GUID_Sine );
- ok( hr == E_POINTER, "IDirectInputDevice8_GetEffectInfo returned %#x\n", hr );
+ ok( hr == E_POINTER, "GetEffectInfo returned %#x\n", hr );
effectinfo.dwSize = sizeof(DIEFFECTINFOW) + 1;
hr = IDirectInputDevice8_GetEffectInfo( device, &effectinfo, &GUID_Sine );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_GetEffectInfo returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "GetEffectInfo returned %#x\n", hr );
effectinfo.dwSize = sizeof(DIEFFECTINFOW);
hr = IDirectInputDevice8_GetEffectInfo( device, &effectinfo, &GUID_NULL );
- ok( hr == DIERR_DEVICENOTREG, "IDirectInputDevice8_GetEffectInfo returned %#x\n", hr );
+ ok( hr == DIERR_DEVICENOTREG, "GetEffectInfo returned %#x\n", hr );
hr = IDirectInputDevice8_GetEffectInfo( device, &effectinfo, &GUID_Sine );
- ok( hr == DIERR_DEVICENOTREG, "IDirectInputDevice8_GetEffectInfo returned %#x\n", hr );
+ ok( hr == DIERR_DEVICENOTREG, "GetEffectInfo returned %#x\n", hr );
hr = IDirectInputDevice8_SetDataFormat( device, NULL );
- ok( hr == E_POINTER, "IDirectInputDevice8_SetDataFormat returned: %#x\n", hr );
+ ok( hr == E_POINTER, "SetDataFormat returned: %#x\n", hr );
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetDataFormat returned: %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetDataFormat returned: %#x\n", hr );
dataformat.dwSize = sizeof(DIDATAFORMAT);
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetDataFormat returned: %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetDataFormat returned: %#x\n", hr );
dataformat.dwObjSize = sizeof(DIOBJECTDATAFORMAT);
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
- ok( hr == DI_OK, "IDirectInputDevice8_SetDataFormat returned: %#x\n", hr );
+ ok( hr == DI_OK, "SetDataFormat returned: %#x\n", hr );
hr = IDirectInputDevice8_SetDataFormat( device, &c_dfDIJoystick2 );
- ok( hr == DI_OK, "IDirectInputDevice8_SetDataFormat returned: %#x\n", hr );
+ ok( hr == DI_OK, "SetDataFormat returned: %#x\n", hr );
hr = IDirectInputDevice8_GetObjectInfo( device, &objinst, DIJOFS_Y, DIPH_BYOFFSET );
- ok( hr == DI_OK, "IDirectInputDevice8_GetObjectInfo returned: %#x\n", hr );
+ ok( hr == DI_OK, "GetObjectInfo returned: %#x\n", hr );
check_member( objinst, expect_objects[0], "%u", dwSize );
check_member_guid( objinst, expect_objects[0], guidType );
@@ -4122,71 +4122,71 @@ static void test_simple_joystick(void)
hr = IDirectInputDevice8_SetEventNotification( device, (HANDLE)0xdeadbeef );
todo_wine
- ok( hr == E_HANDLE, "IDirectInputDevice8_SetEventNotification returned: %#x\n", hr );
+ ok( hr == E_HANDLE, "SetEventNotification returned: %#x\n", hr );
event = CreateEventW( NULL, FALSE, FALSE, NULL );
ok( event != NULL, "CreateEventW failed, last error %u\n", GetLastError() );
hr = IDirectInputDevice8_SetEventNotification( device, event );
- ok( hr == DI_OK, "IDirectInputDevice8_SetEventNotification returned: %#x\n", hr );
+ ok( hr == DI_OK, "SetEventNotification returned: %#x\n", hr );
file = CreateFileW( prop_guid_path.wszPath, FILE_READ_ACCESS | FILE_WRITE_ACCESS,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL );
ok( file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError() );
hr = IDirectInputDevice8_SetCooperativeLevel( device, NULL, 0 );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetCooperativeLevel returned: %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetCooperativeLevel returned: %#x\n", hr );
hr = IDirectInputDevice8_SetCooperativeLevel( device, NULL, DISCL_BACKGROUND );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetCooperativeLevel returned: %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetCooperativeLevel returned: %#x\n", hr );
hr = IDirectInputDevice8_SetCooperativeLevel( device, NULL, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE );
- ok( hr == E_HANDLE, "IDirectInputDevice8_SetCooperativeLevel returned: %#x\n", hr );
+ ok( hr == E_HANDLE, "SetCooperativeLevel returned: %#x\n", hr );
hr = IDirectInputDevice8_SetCooperativeLevel( device, NULL, DISCL_BACKGROUND | DISCL_EXCLUSIVE );
- ok( hr == E_HANDLE, "IDirectInputDevice8_SetCooperativeLevel returned: %#x\n", hr );
+ ok( hr == E_HANDLE, "SetCooperativeLevel returned: %#x\n", hr );
hr = IDirectInputDevice8_SetCooperativeLevel( device, NULL, DISCL_FOREGROUND | DISCL_EXCLUSIVE );
- ok( hr == E_HANDLE, "IDirectInputDevice8_SetCooperativeLevel returned: %#x\n", hr );
+ ok( hr == E_HANDLE, "SetCooperativeLevel returned: %#x\n", hr );
hwnd = CreateWindowW( L"static", L"dinput", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 10, 10, 200, 200,
NULL, NULL, NULL, NULL );
hr = IDirectInputDevice8_SetCooperativeLevel( device, hwnd, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE );
- ok( hr == DI_OK, "IDirectInputDevice8_SetCooperativeLevel returned: %#x\n", hr );
+ ok( hr == DI_OK, "SetCooperativeLevel returned: %#x\n", hr );
hr = IDirectInputDevice8_SetCooperativeLevel( device, hwnd, DISCL_BACKGROUND | DISCL_EXCLUSIVE );
- ok( hr == DI_OK, "IDirectInputDevice8_SetCooperativeLevel returned: %#x\n", hr );
+ ok( hr == DI_OK, "SetCooperativeLevel returned: %#x\n", hr );
hr = IDirectInputDevice8_SetCooperativeLevel( device, hwnd, DISCL_FOREGROUND | DISCL_EXCLUSIVE );
- ok( hr == DI_OK, "IDirectInputDevice8_SetCooperativeLevel returned: %#x\n", hr );
+ ok( hr == DI_OK, "SetCooperativeLevel returned: %#x\n", hr );
hr = IDirectInputDevice8_Unacquire( device );
- ok( hr == DI_NOEFFECT, "IDirectInputDevice8_Unacquire returned: %#x\n", hr );
+ ok( hr == DI_NOEFFECT, "Unacquire returned: %#x\n", hr );
hr = IDirectInputDevice8_Acquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Acquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Acquire returned: %#x\n", hr );
hr = IDirectInputDevice8_SetCooperativeLevel( device, hwnd, DISCL_FOREGROUND | DISCL_EXCLUSIVE );
- ok( hr == DIERR_ACQUIRED, "IDirectInputDevice8_SetCooperativeLevel returned: %#x\n", hr );
+ ok( hr == DIERR_ACQUIRED, "SetCooperativeLevel returned: %#x\n", hr );
hr = IDirectInputDevice8_Unacquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Unacquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Unacquire returned: %#x\n", hr );
DestroyWindow( hwnd );
hr = IDirectInputDevice8_SetCooperativeLevel( device, NULL, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE );
- ok( hr == DI_OK, "IDirectInputDevice8_SetCooperativeLevel returned: %#x\n", hr );
+ ok( hr == DI_OK, "SetCooperativeLevel returned: %#x\n", hr );
hr = IDirectInputDevice8_GetDeviceState( device, sizeof(DIJOYSTATE2), &state );
- ok( hr == DIERR_NOTACQUIRED, "IDirectInputDevice8_GetDeviceState returned: %#x\n", hr );
+ ok( hr == DIERR_NOTACQUIRED, "GetDeviceState returned: %#x\n", hr );
hr = IDirectInputDevice8_Poll( device );
- ok( hr == DIERR_NOTACQUIRED, "IDirectInputDevice8_Poll returned: %#x\n", hr );
+ ok( hr == DIERR_NOTACQUIRED, "Poll returned: %#x\n", hr );
hr = IDirectInputDevice8_Acquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Acquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Acquire returned: %#x\n", hr );
hr = IDirectInputDevice8_Poll( device );
- ok( hr == DI_NOEFFECT, "IDirectInputDevice8_Poll returned: %#x\n", hr );
+ ok( hr == DI_NOEFFECT, "Poll returned: %#x\n", hr );
hr = IDirectInputDevice8_GetDeviceState( device, sizeof(DIJOYSTATE2) + 1, &state );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_GetDeviceState returned: %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "GetDeviceState returned: %#x\n", hr );
for (i = 0; i < ARRAY_SIZE(injected_input); ++i)
{
winetest_push_context( "state[%d]", i );
hr = IDirectInputDevice8_GetDeviceState( device, sizeof(DIJOYSTATE2), &state );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceState returned: %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceState returned: %#x\n", hr );
check_member( state, expect_state[i], "%d", lX );
check_member( state, expect_state[i], "%d", lY );
check_member( state, expect_state[i], "%d", lZ );
@@ -4207,7 +4207,7 @@ static void test_simple_joystick(void)
}
hr = IDirectInputDevice8_GetDeviceState( device, sizeof(DIJOYSTATE2), &state );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceState returned: %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceState returned: %#x\n", hr );
winetest_push_context( "state[%d]", i );
check_member( state, expect_state[i], "%d", lX );
check_member( state, expect_state[i], "%d", lY );
@@ -4223,24 +4223,24 @@ static void test_simple_joystick(void)
res = 1;
hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA) - 1, objdata, &res, DIGDD_PEEK );
todo_wine
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_GetDeviceData returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "GetDeviceData returned %#x\n", hr );
res = 1;
hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, DIGDD_PEEK );
- ok( hr == DIERR_NOTBUFFERED, "IDirectInputDevice8_GetDeviceData returned %#x\n", hr );
+ ok( hr == DIERR_NOTBUFFERED, "GetDeviceData returned %#x\n", hr );
hr = IDirectInputDevice8_Unacquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Unacquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Unacquire returned: %#x\n", hr );
prop_dword.diph.dwHow = DIPH_DEVICE;
prop_dword.diph.dwObj = 0;
prop_dword.dwData = 1;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_BUFFERSIZE, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_BUFFERSIZE returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_BUFFERSIZE returned %#x\n", hr );
hr = IDirectInputDevice8_Acquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Unacquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Unacquire returned: %#x\n", hr );
res = 1;
hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, DIGDD_PEEK );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceData returned %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceData returned %#x\n", hr );
ok( res == 0, "got %u expected %u\n", res, 0 );
send_hid_input( file, &injected_input[0], sizeof(*injected_input) );
@@ -4250,23 +4250,23 @@ static void test_simple_joystick(void)
res = 1;
hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, DIGDD_PEEK );
- ok( hr == DI_BUFFEROVERFLOW, "IDirectInputDevice8_GetDeviceData returned %#x\n", hr );
+ ok( hr == DI_BUFFEROVERFLOW, "GetDeviceData returned %#x\n", hr );
ok( res == 0, "got %u expected %u\n", res, 0 );
res = 1;
hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 0 );
todo_wine
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceData returned %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceData returned %#x\n", hr );
ok( res == 0, "got %u expected %u\n", res, 0 );
hr = IDirectInputDevice8_Unacquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Unacquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Unacquire returned: %#x\n", hr );
prop_dword.diph.dwHow = DIPH_DEVICE;
prop_dword.diph.dwObj = 0;
prop_dword.dwData = 10;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_BUFFERSIZE, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_BUFFERSIZE returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_BUFFERSIZE returned %#x\n", hr );
hr = IDirectInputDevice8_Acquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Unacquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Unacquire returned: %#x\n", hr );
send_hid_input( file, &injected_input[1], sizeof(*injected_input) );
res = WaitForSingleObject( event, 100 );
@@ -4275,14 +4275,14 @@ static void test_simple_joystick(void)
res = 1;
hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, DIGDD_PEEK );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceData returned %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceData returned %#x\n", hr );
ok( res == 1, "got %u expected %u\n", res, 1 );
check_member( objdata[0], expect_objdata[0], "%#x", dwOfs );
check_member( objdata[0], expect_objdata[0], "%#x", dwData );
ok( objdata[0].uAppData == -1, "got %p, expected %p\n", (void *)objdata[0].uAppData, (void *)-1 );
res = 4;
hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 0 );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceData returned %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceData returned %#x\n", hr );
ok( res == 4, "got %u expected %u\n", res, 4 );
for (i = 0; i < 4; ++i)
{
@@ -4304,7 +4304,7 @@ static void test_simple_joystick(void)
res = 1;
hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 0 );
- ok( hr == DI_BUFFEROVERFLOW, "IDirectInputDevice8_GetDeviceData returned %#x\n", hr );
+ ok( hr == DI_BUFFEROVERFLOW, "GetDeviceData returned %#x\n", hr );
ok( res == 1, "got %u expected %u\n", res, 1 );
todo_wine
check_member( objdata[0], expect_objdata[5], "%#x", dwOfs );
@@ -4313,7 +4313,7 @@ static void test_simple_joystick(void)
ok( objdata[0].uAppData == -1, "got %p, expected %p\n", (void *)objdata[0].uAppData, (void *)-1 );
res = ARRAY_SIZE(objdata);
hr = IDirectInputDevice8_GetDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 0 );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceData returned %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceData returned %#x\n", hr );
ok( res == 8, "got %u expected %u\n", res, 8 );
for (i = 0; i < 8; ++i)
{
@@ -4332,7 +4332,7 @@ static void test_simple_joystick(void)
ResetEvent( event );
hr = IDirectInputDevice8_GetDeviceState( device, sizeof(DIJOYSTATE2), &state );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceState returned: %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceState returned: %#x\n", hr );
check_member( state, expect_state[3], "%d", lX );
check_member( state, expect_state[3], "%d", lY );
check_member( state, expect_state[3], "%d", lZ );
@@ -4348,30 +4348,30 @@ static void test_simple_joystick(void)
prop_range.lMin = 1000;
prop_range.lMax = 51000;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_RANGE, &prop_range.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_RANGE returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_RANGE returned %#x\n", hr );
prop_range.diph.dwHow = DIPH_BYUSAGE;
prop_range.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
prop_range.lMin = -4000;
prop_range.lMax = -14000;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_RANGE, &prop_range.diph );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty DIPROP_RANGE returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty DIPROP_RANGE returned %#x\n", hr );
prop_range.lMin = -14000;
prop_range.lMax = -4000;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_RANGE, &prop_range.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_RANGE returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_RANGE returned %#x\n", hr );
prop_range.diph.dwHow = DIPH_DEVICE;
prop_range.diph.dwObj = 0;
prop_range.lMin = 0xdeadbeef;
prop_range.lMax = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_RANGE, &prop_range.diph );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_GetProperty DIPROP_RANGE returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_RANGE returned %#x\n", hr );
prop_range.diph.dwHow = DIPH_BYUSAGE;
prop_range.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
prop_range.lMin = 0xdeadbeef;
prop_range.lMax = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_RANGE, &prop_range.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_RANGE returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_RANGE returned %#x\n", hr );
ok( prop_range.lMin == -14000, "got %d expected %d\n", prop_range.lMin, -14000 );
ok( prop_range.lMax == -4000, "got %d expected %d\n", prop_range.lMax, -4000 );
prop_range.diph.dwHow = DIPH_BYUSAGE;
@@ -4379,12 +4379,12 @@ static void test_simple_joystick(void)
prop_range.lMin = 0xdeadbeef;
prop_range.lMax = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_RANGE, &prop_range.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_RANGE returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_RANGE returned %#x\n", hr );
ok( prop_range.lMin == 1000, "got %d expected %d\n", prop_range.lMin, 1000 );
ok( prop_range.lMax == 51000, "got %d expected %d\n", prop_range.lMax, 51000 );
hr = IDirectInputDevice8_GetDeviceState( device, sizeof(DIJOYSTATE2), &state );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceState returned: %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceState returned: %#x\n", hr );
check_member( state, expect_state_abs[1], "%d", lX );
check_member( state, expect_state_abs[1], "%d", lY );
check_member( state, expect_state_abs[1], "%d", lZ );
@@ -4396,118 +4396,118 @@ static void test_simple_joystick(void)
check_member( state, expect_state_abs[1], "%#x", rgbButtons[2] );
hr = IDirectInputDevice8_SetProperty( device, NULL, NULL );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, &GUID_NULL, NULL );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_VIDPID, NULL );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_VIDPID, &prop_string.diph );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty returned %#x\n", hr );
prop_dword.diph.dwHow = DIPH_DEVICE;
prop_dword.diph.dwObj = 0;
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_VIDPID, &prop_dword.diph );
- ok( hr == DIERR_READONLY, "IDirectInputDevice8_SetProperty DIPROP_VIDPID returned %#x\n", hr );
+ ok( hr == DIERR_READONLY, "SetProperty DIPROP_VIDPID returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_GUIDANDPATH, &prop_guid_path.diph );
- ok( hr == DIERR_READONLY, "IDirectInputDevice8_SetProperty DIPROP_GUIDANDPATH returned %#x\n", hr );
+ ok( hr == DIERR_READONLY, "SetProperty DIPROP_GUIDANDPATH returned %#x\n", hr );
prop_string.diph.dwHow = DIPH_DEVICE;
prop_string.diph.dwObj = 0;
wcscpy( prop_string.wsz, L"instance name" );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_INSTANCENAME, &prop_string.diph );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_SetProperty DIPROP_INSTANCENAME returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "SetProperty DIPROP_INSTANCENAME returned %#x\n", hr );
wcscpy( prop_string.wsz, L"product name" );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_PRODUCTNAME, &prop_string.diph );
todo_wine
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_PRODUCTNAME returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_PRODUCTNAME returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_PRODUCTNAME, &prop_string.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_PRODUCTNAME returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_PRODUCTNAME returned %#x\n", hr );
todo_wine
ok( !wcscmp( prop_string.wsz, expect_devinst.tszProductName ), "got product %s\n",
debugstr_w(prop_string.wsz) );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_TYPENAME, &prop_string.diph );
- ok( hr == DIERR_READONLY, "IDirectInputDevice8_SetProperty DIPROP_TYPENAME returned %#x\n", hr );
+ ok( hr == DIERR_READONLY, "SetProperty DIPROP_TYPENAME returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_USERNAME, &prop_string.diph );
- ok( hr == DIERR_READONLY, "IDirectInputDevice8_SetProperty DIPROP_USERNAME returned %#x\n", hr );
+ ok( hr == DIERR_READONLY, "SetProperty DIPROP_USERNAME returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
- ok( hr == DIERR_READONLY, "IDirectInputDevice8_SetProperty DIPROP_FFLOAD returned %#x\n", hr );
+ ok( hr == DIERR_READONLY, "SetProperty DIPROP_FFLOAD returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_GRANULARITY, &prop_dword.diph );
- ok( hr == DIERR_READONLY, "IDirectInputDevice8_SetProperty DIPROP_GRANULARITY returned %#x\n", hr );
+ ok( hr == DIERR_READONLY, "SetProperty DIPROP_GRANULARITY returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_JOYSTICKID, &prop_dword.diph );
todo_wine
- ok( hr == DIERR_ACQUIRED, "IDirectInputDevice8_SetProperty DIPROP_JOYSTICKID returned %#x\n", hr );
+ ok( hr == DIERR_ACQUIRED, "SetProperty DIPROP_JOYSTICKID returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_AXISMODE, &prop_dword.diph );
- ok( hr == DIERR_ACQUIRED, "IDirectInputDevice8_SetProperty DIPROP_AXISMODE returned %#x\n", hr );
+ ok( hr == DIERR_ACQUIRED, "SetProperty DIPROP_AXISMODE returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_BUFFERSIZE, &prop_dword.diph );
- ok( hr == DIERR_ACQUIRED, "IDirectInputDevice8_SetProperty DIPROP_BUFFERSIZE returned %#x\n", hr );
+ ok( hr == DIERR_ACQUIRED, "SetProperty DIPROP_BUFFERSIZE returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_AUTOCENTER, &prop_dword.diph );
- ok( hr == DIERR_ACQUIRED, "IDirectInputDevice8_SetProperty DIPROP_AUTOCENTER returned %#x\n", hr );
+ ok( hr == DIERR_ACQUIRED, "SetProperty DIPROP_AUTOCENTER returned %#x\n", hr );
prop_pointer.diph.dwHow = DIPH_BYUSAGE;
prop_pointer.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_APPDATA, &prop_pointer.diph );
todo_wine
- ok( hr == DIERR_ACQUIRED, "IDirectInputDevice8_SetProperty DIPROP_APPDATA returned %#x\n", hr );
+ ok( hr == DIERR_ACQUIRED, "SetProperty DIPROP_APPDATA returned %#x\n", hr );
prop_dword.diph.dwHow = DIPH_DEVICE;
prop_dword.diph.dwObj = 0;
prop_dword.dwData = 10001;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_DEADZONE, &prop_dword.diph );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty DIPROP_DEADZONE returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty DIPROP_DEADZONE returned %#x\n", hr );
hr = IDirectInputDevice8_SetProperty( device, DIPROP_SATURATION, &prop_dword.diph );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty DIPROP_SATURATION returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty DIPROP_SATURATION returned %#x\n", hr );
prop_dword.dwData = 1000;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_DEADZONE, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_DEADZONE returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_DEADZONE returned %#x\n", hr );
prop_dword.dwData = 6000;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_SATURATION, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_SATURATION returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_SATURATION returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_DEADZONE, &prop_dword.diph );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_GetProperty DIPROP_DEADZONE returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_DEADZONE returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_SATURATION, &prop_dword.diph );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_GetProperty DIPROP_SATURATION returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "GetProperty DIPROP_SATURATION 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 = 2000;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_DEADZONE, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_DEADZONE returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_DEADZONE returned %#x\n", hr );
ok( prop_dword.dwData == 2000, "got %u expected %u\n", prop_dword.dwData, 2000 );
prop_dword.dwData = 7000;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_SATURATION, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_SATURATION returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_SATURATION 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 = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_DEADZONE, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_DEADZONE returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_DEADZONE returned %#x\n", hr );
ok( prop_dword.dwData == 2000, "got %u expected %u\n", prop_dword.dwData, 2000 );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_SATURATION, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_SATURATION returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_SATURATION returned %#x\n", hr );
ok( prop_dword.dwData == 7000, "got %u expected %u\n", prop_dword.dwData, 7000 );
prop_dword.diph.dwHow = DIPH_BYUSAGE;
prop_dword.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_Y, HID_USAGE_PAGE_GENERIC );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_DEADZONE, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_DEADZONE returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_DEADZONE returned %#x\n", hr );
ok( prop_dword.dwData == 1000, "got %u expected %u\n", prop_dword.dwData, 1000 );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_SATURATION, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_SATURATION returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_SATURATION returned %#x\n", hr );
ok( prop_dword.dwData == 6000, "got %u expected %u\n", prop_dword.dwData, 6000 );
for (i = 0; i < ARRAY_SIZE(injected_input); ++i)
{
winetest_push_context( "state[%d]", i );
hr = IDirectInputDevice8_GetDeviceState( device, sizeof(DIJOYSTATE2), &state );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceState returned: %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceState returned: %#x\n", hr );
if (broken( state.lX == -10750 )) win_skip( "Ignoring 32-bit rounding\n" );
else
{
@@ -4532,7 +4532,7 @@ static void test_simple_joystick(void)
}
hr = IDirectInputDevice8_GetDeviceState( device, sizeof(DIJOYSTATE2), &state );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceState returned: %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceState returned: %#x\n", hr );
winetest_push_context( "state[%d]", i );
check_member( state, expect_state_abs[i], "%d", lX );
check_member( state, expect_state_abs[i], "%d", lY );
@@ -4546,56 +4546,56 @@ static void test_simple_joystick(void)
winetest_pop_context();
hr = IDirectInputDevice8_Unacquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Unacquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Unacquire returned: %#x\n", hr );
prop_dword.diph.dwHow = DIPH_DEVICE;
prop_dword.diph.dwObj = 0;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_JOYSTICKID, &prop_dword.diph );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_SetProperty DIPROP_JOYSTICKID returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "SetProperty DIPROP_JOYSTICKID returned %#x\n", hr );
prop_dword.dwData = 0x1000;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_BUFFERSIZE, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_BUFFERSIZE returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_BUFFERSIZE returned %#x\n", hr );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_AUTOCENTER, &prop_dword.diph );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty DIPROP_AUTOCENTER returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty DIPROP_AUTOCENTER returned %#x\n", hr );
prop_dword.dwData = DIPROPAUTOCENTER_ON;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_AUTOCENTER, &prop_dword.diph );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_SetProperty DIPROP_AUTOCENTER returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "SetProperty DIPROP_AUTOCENTER returned %#x\n", hr );
prop_pointer.diph.dwHow = DIPH_BYUSAGE;
prop_pointer.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
prop_pointer.uData = 0xfeedcafe;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_APPDATA, &prop_pointer.diph );
todo_wine
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_APPDATA returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_APPDATA returned %#x\n", hr );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_AXISMODE, &prop_dword.diph );
todo_wine
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty DIPROP_AXISMODE returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty DIPROP_AXISMODE returned %#x\n", hr );
prop_dword.dwData = DIPROPAXISMODE_REL;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_AXISMODE, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_AXISMODE returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_AXISMODE returned %#x\n", hr );
hr = IDirectInputDevice8_Acquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Unacquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Unacquire returned: %#x\n", hr );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_AXISMODE, &prop_dword.diph );
todo_wine
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_AXISMODE returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_AXISMODE returned %#x\n", hr );
todo_wine
ok( prop_dword.dwData == DIPROPAXISMODE_REL, "got %u expected %u\n", prop_dword.dwData, DIPROPAXISMODE_REL );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_BUFFERSIZE, &prop_dword.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_BUFFERSIZE returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_BUFFERSIZE returned %#x\n", hr );
ok( prop_dword.dwData == 0x1000, "got %#x expected %#x\n", prop_dword.dwData, 0x1000 );
prop_pointer.diph.dwHow = DIPH_BYUSAGE;
prop_pointer.diph.dwObj = MAKELONG( HID_USAGE_GENERIC_X, HID_USAGE_PAGE_GENERIC );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_APPDATA, &prop_pointer.diph );
todo_wine
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_APPDATA returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_APPDATA returned %#x\n", hr );
ok( prop_pointer.uData == 0xfeedcafe, "got %p expected %p\n", (void *)prop_pointer.uData, (void *)0xfeedcafe );
prop_dword.diph.dwHow = DIPH_DEVICE;
@@ -4603,28 +4603,28 @@ static void test_simple_joystick(void)
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_FFGAIN, &prop_dword.diph );
todo_wine
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty DIPROP_FFGAIN returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty DIPROP_FFGAIN returned %#x\n", hr );
prop_dword.dwData = 1000;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_FFGAIN, &prop_dword.diph );
todo_wine
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_FFGAIN returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_FFGAIN returned %#x\n", hr );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_CALIBRATION, &prop_dword.diph );
todo_wine
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty DIPROP_CALIBRATION returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty DIPROP_CALIBRATION returned %#x\n", hr );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_DEADZONE, &prop_dword.diph );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty DIPROP_DEADZONE returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty DIPROP_DEADZONE returned %#x\n", hr );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_SATURATION, &prop_dword.diph );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty DIPROP_SATURATION returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty DIPROP_SATURATION returned %#x\n", hr );
for (i = 0; i < ARRAY_SIZE(injected_input); ++i)
{
winetest_push_context( "state[%d]", i );
hr = IDirectInputDevice8_GetDeviceState( device, sizeof(DIJOYSTATE2), &state );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceState returned: %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceState returned: %#x\n", hr );
todo_wine
check_member( state, expect_state_rel[i], "%d", lX );
todo_wine
@@ -4648,7 +4648,7 @@ static void test_simple_joystick(void)
}
hr = IDirectInputDevice8_GetDeviceState( device, sizeof(DIJOYSTATE2), &state );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceState returned: %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceState returned: %#x\n", hr );
winetest_push_context( "state[%d]", i );
todo_wine
check_member( state, expect_state_rel[i], "%d", lX );
@@ -4665,63 +4665,63 @@ static void test_simple_joystick(void)
winetest_pop_context();
hr = IDirectInputDevice8_GetForceFeedbackState( device, NULL );
- ok( hr == E_POINTER, "IDirectInputDevice8_GetForceFeedbackState returned %#x\n", hr );
+ ok( hr == E_POINTER, "GetForceFeedbackState returned %#x\n", hr );
res = 0xdeadbeef;
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_GetForceFeedbackState returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "GetForceFeedbackState returned %#x\n", hr );
hr = IDirectInputDevice8_SendForceFeedbackCommand( device, 0xdeadbeef );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SendForceFeedbackCommand returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SendForceFeedbackCommand returned %#x\n", hr );
hr = IDirectInputDevice8_SendForceFeedbackCommand( device, DISFFC_RESET );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_SendForceFeedbackCommand returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "SendForceFeedbackCommand returned %#x\n", hr );
objdata[0].dwOfs = 0xd;
objdata[0].dwData = 0x80;
res = 1;
hr = IDirectInputDevice8_SendDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 0xdeadbeef );
todo_wine
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SendDeviceData returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SendDeviceData returned %#x\n", hr );
res = 1;
hr = IDirectInputDevice8_SendDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 1 /*DISDD_CONTINUE*/ );
todo_wine
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SendDeviceData returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SendDeviceData returned %#x\n", hr );
res = 1;
hr = IDirectInputDevice8_SendDeviceData( device, sizeof(DIDEVICEOBJECTDATA), objdata, &res, 0 );
todo_wine
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SendDeviceData returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SendDeviceData returned %#x\n", hr );
hr = IDirectInputDevice8_CreateEffect( device, &GUID_Sine, NULL, NULL, NULL );
- ok( hr == E_POINTER, "IDirectInputDevice8_CreateEffect returned %#x\n", hr );
+ ok( hr == E_POINTER, "CreateEffect returned %#x\n", hr );
hr = IDirectInputDevice8_CreateEffect( device, NULL, NULL, &effect, NULL );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_CreateEffect returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "CreateEffect returned %#x\n", hr );
hr = IDirectInputDevice8_CreateEffect( device, &GUID_NULL, NULL, &effect, NULL );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_CreateEffect returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "CreateEffect returned %#x\n", hr );
hr = IDirectInputDevice8_CreateEffect( device, &GUID_Sine, NULL, &effect, NULL );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_CreateEffect returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "CreateEffect returned %#x\n", hr );
hr = IDirectInputDevice8_Unacquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Unacquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Unacquire returned: %#x\n", hr );
hr = IDirectInputDevice8_CreateEffect( device, &GUID_Sine, NULL, &effect, NULL );
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_CreateEffect returned %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "CreateEffect returned %#x\n", hr );
hr = IDirectInputDevice8_EnumCreatedEffectObjects( device, NULL, effect, 0 );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_EnumCreatedEffectObjects returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "EnumCreatedEffectObjects returned %#x\n", hr );
hr = IDirectInputDevice8_EnumCreatedEffectObjects( device, check_no_created_effect_objects, effect, 0xdeadbeef );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_EnumCreatedEffectObjects returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "EnumCreatedEffectObjects returned %#x\n", hr );
hr = IDirectInputDevice8_EnumCreatedEffectObjects( device, check_no_created_effect_objects, (void *)0xdeadbeef, 0 );
- ok( hr == DI_OK, "IDirectInputDevice8_EnumCreatedEffectObjects returned %#x\n", hr );
+ ok( hr == DI_OK, "EnumCreatedEffectObjects returned %#x\n", hr );
hr = IDirectInputDevice8_Escape( device, NULL );
todo_wine
- ok( hr == E_POINTER, "IDirectInputDevice8_Escape returned: %#x\n", hr );
+ ok( hr == E_POINTER, "Escape returned: %#x\n", hr );
hr = IDirectInputDevice8_Escape( device, &escape );
todo_wine
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_Escape returned: %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "Escape returned: %#x\n", hr );
escape.dwSize = sizeof(DIEFFESCAPE) + 1;
hr = IDirectInputDevice8_Escape( device, &escape );
todo_wine
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_Escape returned: %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "Escape returned: %#x\n", hr );
escape.dwSize = sizeof(DIEFFESCAPE);
escape.dwCommand = 0;
escape.lpvInBuffer = buffer;
@@ -4730,19 +4730,19 @@ static void test_simple_joystick(void)
escape.cbOutBuffer = 10;
hr = IDirectInputDevice8_Escape( device, &escape );
todo_wine
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_Escape returned: %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "Escape returned: %#x\n", hr );
/* FIXME: we have to wait a bit because Wine DInput internal thread keeps a reference */
Sleep( 100 );
ref = IDirectInputDevice8_Release( device );
- ok( ref == 0, "IDirectInputDeviceW_Release returned %d\n", ref );
+ ok( ref == 0, "Release returned %d\n", ref );
CloseHandle( event );
CloseHandle( file );
ref = IDirectInput8_Release( di );
- ok( ref == 0, "IDirectInput8_Release returned %d\n", ref );
+ ok( ref == 0, "Release returned %d\n", ref );
done:
pnp_driver_stop();
@@ -5030,7 +5030,7 @@ static BOOL test_device_types(void)
}
hr = IDirectInput8_EnumDevices( di, DI8DEVCLASS_ALL, find_test_device, &devinst, DIEDFL_ALLDEVICES );
- ok( hr == DI_OK, "IDirectInput8_EnumDevices returned: %#x\n", hr );
+ ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr );
if (!IsEqualGUID( &devinst.guidProduct, &expect_guid_product ))
{
win_skip( "device not found, skipping tests\n" );
@@ -5040,10 +5040,10 @@ static BOOL test_device_types(void)
}
hr = IDirectInput8_CreateDevice( di, &expect_guid_product, &device, NULL );
- ok( hr == DI_OK, "IDirectInput8_CreateDevice returned %#x\n", hr );
+ ok( hr == DI_OK, "CreateDevice returned %#x\n", hr );
hr = IDirectInputDevice8_GetDeviceInfo( device, &devinst );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceInfo returned %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceInfo returned %#x\n", hr );
check_member( devinst, expect_devinst[i], "%d", dwSize );
todo_wine
check_member_guid( devinst, expect_devinst[i], guidInstance );
@@ -5058,7 +5058,7 @@ static BOOL test_device_types(void)
check_member( devinst, expect_devinst[i], "%04x", wUsage );
hr = IDirectInputDevice8_GetCapabilities( device, &caps );
- ok( hr == DI_OK, "IDirectInputDevice8_GetCapabilities returned %#x\n", hr );
+ ok( hr == DI_OK, "GetCapabilities returned %#x\n", hr );
check_member( caps, expect_caps[i], "%d", dwSize );
check_member( caps, expect_caps[i], "%#x", dwFlags );
check_member( caps, expect_caps[i], "%#x", dwDevType );
@@ -5072,10 +5072,10 @@ static BOOL test_device_types(void)
check_member( caps, expect_caps[i], "%d", dwFFDriverVersion );
ref = IDirectInputDevice8_Release( device );
- ok( ref == 0, "IDirectInputDeviceW_Release returned %d\n", ref );
+ ok( ref == 0, "Release returned %d\n", ref );
ref = IDirectInput8_Release( di );
- ok( ref == 0, "IDirectInput8_Release returned %d\n", ref );
+ ok( ref == 0, "Release returned %d\n", ref );
done:
pnp_driver_stop();
@@ -5095,29 +5095,29 @@ static void test_periodic_effect( IDirectInputDevice8W *device, HANDLE file )
ULONG ref;
hr = IDirectInputDevice8_CreateEffect( device, &GUID_Sine, NULL, NULL, NULL );
- ok( hr == E_POINTER, "IDirectInputDevice8_CreateEffect returned %#x\n", hr );
+ ok( hr == E_POINTER, "CreateEffect returned %#x\n", hr );
hr = IDirectInputDevice8_CreateEffect( device, NULL, NULL, &effect, NULL );
todo_wine
- ok( hr == E_POINTER, "IDirectInputDevice8_CreateEffect returned %#x\n", hr );
+ ok( hr == E_POINTER, "CreateEffect returned %#x\n", hr );
if (hr == DI_OK) IDirectInputEffect_Release( effect );
hr = IDirectInputDevice8_CreateEffect( device, &GUID_NULL, NULL, &effect, NULL );
todo_wine
- ok( hr == DIERR_DEVICENOTREG, "IDirectInputDevice8_CreateEffect returned %#x\n", hr );
+ ok( hr == DIERR_DEVICENOTREG, "CreateEffect returned %#x\n", hr );
if (hr == DI_OK) IDirectInputEffect_Release( effect );
hr = IDirectInputDevice8_CreateEffect( device, &GUID_Sine, NULL, &effect, NULL );
- ok( hr == DI_OK, "IDirectInputDevice8_CreateEffect returned %#x\n", hr );
+ ok( hr == DI_OK, "CreateEffect returned %#x\n", hr );
if (hr != DI_OK) return;
hr = IDirectInputDevice8_EnumCreatedEffectObjects( device, check_no_created_effect_objects, effect, 0xdeadbeef );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_EnumCreatedEffectObjects returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "EnumCreatedEffectObjects returned %#x\n", hr );
check_params.expect_effect = effect;
hr = IDirectInputDevice8_EnumCreatedEffectObjects( device, check_created_effect_objects, &check_params, 0 );
- ok( hr == DI_OK, "IDirectInputDevice8_EnumCreatedEffectObjects returned %#x\n", hr );
+ ok( hr == DI_OK, "EnumCreatedEffectObjects returned %#x\n", hr );
ok( check_params.count == 1, "got count %u, expected 1\n", check_params.count );
ref = IDirectInputEffect_Release( effect );
- ok( ref == 0, "IDirectInputDeviceW_Release returned %d\n", ref );
+ ok( ref == 0, "Release returned %d\n", ref );
}
static void test_force_feedback_joystick( void )
@@ -5664,7 +5664,7 @@ static void test_force_feedback_joystick( void )
}
hr = IDirectInput8_EnumDevices( di, DI8DEVCLASS_ALL, find_test_device, &devinst, DIEDFL_ALLDEVICES );
- ok( hr == DI_OK, "IDirectInput8_EnumDevices returned: %#x\n", hr );
+ ok( hr == DI_OK, "EnumDevices returned: %#x\n", hr );
if (!IsEqualGUID( &devinst.guidProduct, &expect_guid_product ))
{
win_skip( "device not found, skipping tests\n" );
@@ -5673,10 +5673,10 @@ static void test_force_feedback_joystick( void )
}
hr = IDirectInput8_CreateDevice( di, &expect_guid_product, &device, NULL );
- ok( hr == DI_OK, "IDirectInput8_CreateDevice returned %#x\n", hr );
+ ok( hr == DI_OK, "CreateDevice returned %#x\n", hr );
hr = IDirectInputDevice8_GetDeviceInfo( device, &devinst );
- ok( hr == DI_OK, "IDirectInputDevice8_GetDeviceInfo returned %#x\n", hr );
+ ok( hr == DI_OK, "GetDeviceInfo returned %#x\n", hr );
check_member( devinst, expect_devinst, "%d", dwSize );
todo_wine
check_member_guid( devinst, expect_devinst, guidInstance );
@@ -5692,7 +5692,7 @@ static void test_force_feedback_joystick( void )
caps.dwSize = sizeof(DIDEVCAPS);
hr = IDirectInputDevice8_GetCapabilities( device, &caps );
- ok( hr == DI_OK, "IDirectInputDevice8_GetCapabilities returned %#x\n", hr );
+ ok( hr == DI_OK, "GetCapabilities returned %#x\n", hr );
check_member( caps, expect_caps, "%d", dwSize );
check_member( caps, expect_caps, "%#x", dwFlags );
check_member( caps, expect_caps, "%#x", dwDevType );
@@ -5708,35 +5708,35 @@ static void test_force_feedback_joystick( void )
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFGAIN, &prop_dword.diph );
todo_wine
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_FFGAIN returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_FFGAIN returned %#x\n", hr );
todo_wine
ok( prop_dword.dwData == 10000, "got %u expected %u\n", prop_dword.dwData, 10000 );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
todo_wine
- ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "IDirectInputDevice8_GetProperty DIPROP_FFLOAD returned %#x\n", hr );
+ ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetProperty DIPROP_FFLOAD returned %#x\n", hr );
hr = IDirectInputDevice8_EnumObjects( device, check_objects, &check_objects_params, DIDFT_ALL );
- ok( hr == DI_OK, "IDirectInputDevice8_EnumObjects returned %#x\n", hr );
+ ok( hr == DI_OK, "EnumObjects returned %#x\n", hr );
ok( check_objects_params.index >= check_objects_params.expect_count, "missing %u objects\n",
check_objects_params.expect_count - check_objects_params.index );
res = 0;
hr = IDirectInputDevice8_EnumEffects( device, check_effect_count, &res, 0xfe );
- ok( hr == DI_OK, "IDirectInputDevice8_EnumEffects returned %#x\n", hr );
+ ok( hr == DI_OK, "EnumEffects returned %#x\n", hr );
ok( res == 0, "got %u expected %u\n", res, 0 );
res = 0;
hr = IDirectInputDevice8_EnumEffects( device, check_effect_count, &res, DIEFT_PERIODIC );
- ok( hr == DI_OK, "IDirectInputDevice8_EnumEffects returned %#x\n", hr );
+ ok( hr == DI_OK, "EnumEffects returned %#x\n", hr );
ok( res == 1, "got %u expected %u\n", res, 1 );
hr = IDirectInputDevice8_EnumEffects( device, check_effects, &check_effects_params, DIEFT_ALL );
- ok( hr == DI_OK, "IDirectInputDevice8_EnumEffects returned %#x\n", hr );
+ ok( hr == DI_OK, "EnumEffects returned %#x\n", hr );
ok( check_effects_params.index >= check_effects_params.expect_count, "missing %u effects\n",
check_effects_params.expect_count - check_effects_params.index );
effectinfo.dwSize = sizeof(DIEFFECTINFOW);
hr = IDirectInputDevice8_GetEffectInfo( device, &effectinfo, &GUID_Sine );
- ok( hr == DI_OK, "IDirectInputDevice8_GetEffectInfo returned %#x\n", hr );
+ ok( hr == DI_OK, "GetEffectInfo returned %#x\n", hr );
check_member_guid( effectinfo, expect_effects[0], guid );
check_member( effectinfo, expect_effects[0], "%#x", dwEffType );
check_member( effectinfo, expect_effects[0], "%#x", dwStaticParams );
@@ -5744,10 +5744,10 @@ static void test_force_feedback_joystick( void )
check_member_wstr( effectinfo, expect_effects[0], tszName );
hr = IDirectInputDevice8_SetDataFormat( device, &c_dfDIJoystick2 );
- ok( hr == DI_OK, "IDirectInputDevice8_SetDataFormat returned: %#x\n", hr );
+ ok( hr == DI_OK, "SetDataFormat returned: %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_GUIDANDPATH, &prop_guid_path.diph );
- ok( hr == DI_OK, "IDirectInputDevice8_GetProperty DIPROP_GUIDANDPATH returned %#x\n", hr );
+ ok( hr == DI_OK, "GetProperty DIPROP_GUIDANDPATH returned %#x\n", hr );
file = CreateFileW( prop_guid_path.wszPath, FILE_READ_ACCESS | FILE_WRITE_ACCESS,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL );
@@ -5757,33 +5757,33 @@ static void test_force_feedback_joystick( void )
NULL, NULL, NULL, NULL );
hr = IDirectInputDevice8_SetCooperativeLevel( device, hwnd, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE );
- ok( hr == DI_OK, "IDirectInputDevice8_SetCooperativeLevel returned: %#x\n", hr );
+ ok( hr == DI_OK, "SetCooperativeLevel returned: %#x\n", hr );
hr = IDirectInputDevice8_Acquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Acquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Acquire returned: %#x\n", hr );
prop_dword.diph.dwHow = DIPH_DEVICE;
prop_dword.diph.dwObj = 0;
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_FFGAIN, &prop_dword.diph );
todo_wine
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SetProperty DIPROP_FFGAIN returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SetProperty DIPROP_FFGAIN returned %#x\n", hr );
prop_dword.dwData = 1000;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_FFGAIN, &prop_dword.diph );
todo_wine
- ok( hr == DI_OK, "IDirectInputDevice8_SetProperty DIPROP_FFGAIN returned %#x\n", hr );
+ ok( hr == DI_OK, "SetProperty DIPROP_FFGAIN returned %#x\n", hr );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_SetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
- ok( hr == DIERR_READONLY, "IDirectInputDevice8_SetProperty DIPROP_FFLOAD returned %#x\n", hr );
+ ok( hr == DIERR_READONLY, "SetProperty DIPROP_FFLOAD returned %#x\n", hr );
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
todo_wine
- ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "IDirectInputDevice8_GetProperty DIPROP_FFLOAD returned %#x\n", hr );
+ ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetProperty DIPROP_FFLOAD returned %#x\n", hr );
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
- ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "IDirectInputDevice8_GetForceFeedbackState returned %#x\n", hr );
+ ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "GetForceFeedbackState returned %#x\n", hr );
hr = IDirectInputDevice8_SendForceFeedbackCommand( device, DISFFC_RESET );
- ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "IDirectInputDevice8_SendForceFeedbackCommand returned %#x\n", hr );
+ ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "SendForceFeedbackCommand returned %#x\n", hr );
escape.dwSize = sizeof(DIEFFESCAPE);
escape.dwCommand = 0;
@@ -5793,75 +5793,75 @@ static void test_force_feedback_joystick( void )
escape.cbOutBuffer = 10;
hr = IDirectInputDevice8_Escape( device, &escape );
todo_wine
- ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "IDirectInputDevice8_Escape returned: %#x\n", hr );
+ ok( hr == DIERR_NOTEXCLUSIVEACQUIRED, "Escape returned: %#x\n", hr );
hr = IDirectInputDevice8_Unacquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Unacquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Unacquire returned: %#x\n", hr );
hr = IDirectInputDevice8_SetCooperativeLevel( device, hwnd, DISCL_BACKGROUND | DISCL_EXCLUSIVE );
- ok( hr == DI_OK, "IDirectInputDevice8_SetCooperativeLevel returned: %#x\n", hr );
+ ok( hr == DI_OK, "SetCooperativeLevel returned: %#x\n", hr );
set_hid_expect( file, &expect_dc_reset, sizeof(expect_dc_reset) );
hr = IDirectInputDevice8_Acquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Acquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Acquire returned: %#x\n", hr );
set_hid_expect( file, NULL, 0 );
hr = IDirectInputDevice8_Escape( device, &escape );
todo_wine
- ok( hr == DIERR_UNSUPPORTED, "IDirectInputDevice8_Escape returned: %#x\n", hr );
+ ok( hr == DIERR_UNSUPPORTED, "Escape returned: %#x\n", hr );
prop_dword.dwData = 0xdeadbeef;
hr = IDirectInputDevice8_GetProperty( device, DIPROP_FFLOAD, &prop_dword.diph );
todo_wine
- ok( hr == 0x80040301, "IDirectInputDevice8_GetProperty DIPROP_FFLOAD returned %#x\n", hr );
+ ok( hr == 0x80040301, "GetProperty DIPROP_FFLOAD returned %#x\n", hr );
res = 0xdeadbeef;
hr = IDirectInputDevice8_GetForceFeedbackState( device, &res );
todo_wine
- ok( hr == 0x80040301, "IDirectInputDevice8_GetForceFeedbackState returned %#x\n", hr );
+ ok( hr == 0x80040301, "GetForceFeedbackState returned %#x\n", hr );
hr = IDirectInputDevice8_SendForceFeedbackCommand( device, 0xdeadbeef );
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SendForceFeedbackCommand returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SendForceFeedbackCommand returned %#x\n", hr );
set_hid_expect( file, &expect_dc_reset, sizeof(expect_dc_reset) );
hr = IDirectInputDevice8_SendForceFeedbackCommand( device, DISFFC_RESET );
- ok( hr == DI_OK, "IDirectInputDevice8_SendForceFeedbackCommand returned %#x\n", hr );
+ ok( hr == DI_OK, "SendForceFeedbackCommand returned %#x\n", hr );
set_hid_expect( file, NULL, 0 );
hr = IDirectInputDevice8_SendForceFeedbackCommand( device, DISFFC_STOPALL );
- ok( hr == HIDP_STATUS_USAGE_NOT_FOUND, "IDirectInputDevice8_SendForceFeedbackCommand returned %#x\n", hr );
+ ok( hr == HIDP_STATUS_USAGE_NOT_FOUND, "SendForceFeedbackCommand returned %#x\n", hr );
hr = IDirectInputDevice8_SendForceFeedbackCommand( device, DISFFC_PAUSE );
- ok( hr == HIDP_STATUS_USAGE_NOT_FOUND, "IDirectInputDevice8_SendForceFeedbackCommand returned %#x\n", hr );
+ ok( hr == HIDP_STATUS_USAGE_NOT_FOUND, "SendForceFeedbackCommand returned %#x\n", hr );
hr = IDirectInputDevice8_SendForceFeedbackCommand( device, DISFFC_CONTINUE );
- ok( hr == HIDP_STATUS_USAGE_NOT_FOUND, "IDirectInputDevice8_SendForceFeedbackCommand returned %#x\n", hr );
+ ok( hr == HIDP_STATUS_USAGE_NOT_FOUND, "SendForceFeedbackCommand returned %#x\n", hr );
hr = IDirectInputDevice8_SendForceFeedbackCommand( device, DISFFC_SETACTUATORSON );
- ok( hr == HIDP_STATUS_USAGE_NOT_FOUND, "IDirectInputDevice8_SendForceFeedbackCommand returned %#x\n", hr );
+ ok( hr == HIDP_STATUS_USAGE_NOT_FOUND, "SendForceFeedbackCommand returned %#x\n", hr );
hr = IDirectInputDevice8_SendForceFeedbackCommand( device, DISFFC_SETACTUATORSOFF );
- ok( hr == HIDP_STATUS_USAGE_NOT_FOUND, "IDirectInputDevice8_SendForceFeedbackCommand returned %#x\n", hr );
+ ok( hr == HIDP_STATUS_USAGE_NOT_FOUND, "SendForceFeedbackCommand returned %#x\n", hr );
objdata.dwOfs = 0x1e;
objdata.dwData = 0x80;
res = 1;
hr = IDirectInputDevice8_SendDeviceData( device, sizeof(DIDEVICEOBJECTDATA), &objdata, &res, 0 );
todo_wine
- ok( hr == DIERR_INVALIDPARAM, "IDirectInputDevice8_SendDeviceData returned %#x\n", hr );
+ ok( hr == DIERR_INVALIDPARAM, "SendDeviceData returned %#x\n", hr );
test_periodic_effect( device, file );
set_hid_expect( file, &expect_dc_reset, sizeof(expect_dc_reset) );
hr = IDirectInputDevice8_Unacquire( device );
- ok( hr == DI_OK, "IDirectInputDevice8_Unacquire returned: %#x\n", hr );
+ ok( hr == DI_OK, "Unacquire returned: %#x\n", hr );
set_hid_expect( file, NULL, 0 );
/* FIXME: we have to wait a bit because Wine DInput internal thread keeps a reference */
Sleep( 100 );
ref = IDirectInputDevice8_Release( device );
- ok( ref == 0, "IDirectInputDeviceW_Release returned %d\n", ref );
+ ok( ref == 0, "Release returned %d\n", ref );
DestroyWindow( hwnd );
CloseHandle( file );
ref = IDirectInput8_Release( di );
- ok( ref == 0, "IDirectInput8_Release returned %d\n", ref );
+ ok( ref == 0, "Release returned %d\n", ref );
done:
pnp_driver_stop();
--
2.33.0
1
11
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/iphlpapi/iphlpapi_main.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c
index b2e996a6241..ae356dc7b8c 100644
--- a/dlls/iphlpapi/iphlpapi_main.c
+++ b/dlls/iphlpapi/iphlpapi_main.c
@@ -17,19 +17,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-
-#include "config.h"
-
#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
@@ -57,13 +45,10 @@
WINE_DEFAULT_DEBUG_CHANNEL(iphlpapi);
-#ifndef IF_NAMESIZE
-#define IF_NAMESIZE 16
-#endif
-
#ifndef INADDR_NONE
#define INADDR_NONE ~0UL
#endif
+#define INADDR_ANY 0UL
#define CHARS_IN_GUID 39
--
2.23.0
1
1
[PATCH 01/19] dbghelp: don't expose SymTagExe or SymTagCompiland's address nor length in SymGetTypeInfo()
by Eric Pouech 06 Oct '21
by Eric Pouech 06 Oct '21
06 Oct '21
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/dbghelp/type.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/dbghelp/type.c b/dlls/dbghelp/type.c
index 70719cf6b7c..0baa9d72c32 100644
--- a/dlls/dbghelp/type.c
+++ b/dlls/dbghelp/type.c
@@ -158,11 +158,11 @@ BOOL symt_get_address(const struct symt* type, ULONG64* addr)
case SymTagThunk:
*addr = ((const struct symt_thunk*)type)->address;
break;
- case SymTagCompiland:
- *addr = ((const struct symt_compiland*)type)->address;
- break;
default:
FIXME("Unsupported sym-tag %s for get-address\n", symt_get_tag_str(type->tag));
+ /* fall through */
+ case SymTagExe:
+ case SymTagCompiland:
return FALSE;
}
return TRUE;
@@ -689,6 +689,8 @@ BOOL symt_get_info(struct module* module, const struct symt* type,
FIXME("Unsupported sym-tag %s for get-length\n",
symt_get_tag_str(type->tag));
/* fall through */
+ case SymTagExe:
+ case SymTagCompiland:
case SymTagFunctionType:
return FALSE;
}
1
18
[PATCH 5/5] comctl32/tests: Fix a treeview test failure when theming is on.
by Zhiyi Zhang 06 Oct '21
by Zhiyi Zhang 06 Oct '21
06 Oct '21
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/tests/treeview.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c
index 02d914c249c..0d245cf9d15 100644
--- a/dlls/comctl32/tests/treeview.c
+++ b/dlls/comctl32/tests/treeview.c
@@ -27,12 +27,17 @@
#include "winuser.h"
#include "winnls.h"
#include "winreg.h"
-#include "commctrl.h"
+#include "commctrl.h"
+#include "uxtheme.h"
+#include "vsstyle.h"
#include "wine/test.h"
#include "v6util.h"
#include "msg.h"
+static HTHEME (WINAPI *pGetWindowTheme)(HWND);
+static BOOL (WINAPI *pIsThemeBackgroundPartiallyTransparent)(HTHEME, int, int);
+
static BOOL (WINAPI *pInitCommonControlsEx)(const INITCOMMONCONTROLSEX*);
static const char *TEST_CALLBACK_TEXT = "callback_text";
@@ -2121,6 +2126,8 @@ static void test_TVS_SINGLEEXPAND(void)
static void test_WM_PAINT(void)
{
+ BOOL is_glyph_transparent;
+ HTHEME htheme;
HWND hTree;
COLORREF clr;
LONG ret;
@@ -2144,7 +2151,11 @@ static void test_WM_PAINT(void)
ok(ret == 0, "got %d\n", ret);
clr = GetPixel(hdc, 1, 1);
- ok(clr == RGB(255, 0, 0) || broken(clr == RGB(0, 0, 0)) /* win98 */,
+ htheme = pGetWindowTheme(hTree);
+ is_glyph_transparent = htheme && pIsThemeBackgroundPartiallyTransparent(htheme, TVP_GLYPH, 0);
+ ok(clr == RGB(255, 0, 0) || broken(clr == RGB(0, 0, 0)) /* win98 */
+ /* When theming is on and treeview glyphs are transparent, parent window needs to be repainted */
+ || (is_glyph_transparent && clr == GetSysColor(COLOR_WINDOW)),
"got 0x%x\n", clr);
ReleaseDC(hMainWnd, hdc);
@@ -2945,9 +2956,13 @@ static void test_right_click(void)
static void init_functions(void)
{
HMODULE hComCtl32 = LoadLibraryA("comctl32.dll");
+ HMODULE hUxtheme = LoadLibraryA("uxtheme.dll");
-#define X(f) p##f = (void*)GetProcAddress(hComCtl32, #f);
- X(InitCommonControlsEx);
+#define X(module, f) p##f = (void*)GetProcAddress(module, #f);
+ X(hComCtl32, InitCommonControlsEx);
+
+ X(hUxtheme, GetWindowTheme);
+ X(hUxtheme, IsThemeBackgroundPartiallyTransparent);
#undef X
}
--
2.30.2
1
0
06 Oct '21
Fix status test failures when theming is on.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/status.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c
index 7bc9ec4386f..9078e4a70bc 100644
--- a/dlls/comctl32/status.c
+++ b/dlls/comctl32/status.c
@@ -102,7 +102,6 @@ static inline LPCSTR debugstr_t(LPCWSTR text, BOOL isW)
static UINT
STATUSBAR_ComputeHeight(STATUS_INFO *infoPtr)
{
- HTHEME theme;
UINT height;
TEXTMETRICW tm;
int margin;
@@ -111,21 +110,6 @@ STATUSBAR_ComputeHeight(STATUS_INFO *infoPtr)
margin = (tm.tmInternalLeading ? tm.tmInternalLeading : 2);
height = max(tm.tmHeight + margin + 2*GetSystemMetrics(SM_CYBORDER), infoPtr->minHeight) + infoPtr->verticalBorder;
- if ((theme = GetWindowTheme(infoPtr->Self)))
- {
- /* Determine bar height from theme such that the content area is
- * textHeight pixels large */
- HDC hdc = GetDC(infoPtr->Self);
- RECT r;
-
- SetRect(&r, 0, 0, 0, max(infoPtr->minHeight, tm.tmHeight));
- if (SUCCEEDED(GetThemeBackgroundExtent(theme, hdc, SP_PANE, 0, &r, &r)))
- {
- height = r.bottom - r.top;
- }
- ReleaseDC(infoPtr->Self, hdc);
- }
-
TRACE(" textHeight=%d+%d, final height=%d\n", tm.tmHeight, tm.tmInternalLeading, height);
return height;
}
--
2.30.2
1
0
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/tests/rebar.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c
index 462782a1b11..d0b201a8763 100644
--- a/dlls/comctl32/tests/rebar.c
+++ b/dlls/comctl32/tests/rebar.c
@@ -18,11 +18,9 @@
*/
#include <assert.h>
-#include <stdarg.h>
#include <windows.h>
#include <commctrl.h>
-#include <uxtheme.h>
#include "wine/heap.h"
#include "wine/test.h"
--
2.30.2
1
0
06 Oct '21
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/rebar.c | 17 +++----------
dlls/comctl32/tests/rebar.c | 50 +++++++++++++++++++++++++++++--------
2 files changed, 42 insertions(+), 25 deletions(-)
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index 84390bd0b52..6a065514e60 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -2930,14 +2930,9 @@ REBAR_Create (REBAR_INFO *infoPtr, LPCREATESTRUCTW cs)
cs->x, cs->y, cs->cx, cs->cy);
}
+ OpenThemeData(infoPtr->hwndSelf, themeClass);
+
TRACE("created!\n");
-
- if (OpenThemeData (infoPtr->hwndSelf, themeClass))
- {
- /* native seems to clear WS_BORDER when themed */
- infoPtr->dwStyle &= ~WS_BORDER;
- }
-
return 0;
}
@@ -3508,8 +3503,6 @@ REBAR_StyleChanged (REBAR_INFO *infoPtr, INT nType, const STYLESTRUCT *lpStyle)
if (nType == GWL_STYLE)
{
infoPtr->orgStyle = infoPtr->dwStyle = lpStyle->styleNew;
- if (GetWindowTheme (infoPtr->hwndSelf))
- infoPtr->dwStyle &= ~WS_BORDER;
/* maybe it should be COMMON_STYLES like in toolbar */
if ((lpStyle->styleNew ^ lpStyle->styleOld) & CCS_VERT)
REBAR_Layout(infoPtr);
@@ -3522,11 +3515,7 @@ static LRESULT theme_changed (REBAR_INFO* infoPtr)
{
HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
CloseThemeData (theme);
- theme = OpenThemeData (infoPtr->hwndSelf, themeClass);
- /* WS_BORDER disappears when theming is enabled and reappears when
- * disabled... */
- infoPtr->dwStyle &= ~WS_BORDER;
- infoPtr->dwStyle |= theme ? 0 : (infoPtr->orgStyle & WS_BORDER);
+ OpenThemeData(infoPtr->hwndSelf, themeClass);
return 0;
}
diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c
index 21b655b197f..462782a1b11 100644
--- a/dlls/comctl32/tests/rebar.c
+++ b/dlls/comctl32/tests/rebar.c
@@ -77,11 +77,11 @@ static void init_system_font_height(void) {
system_font_height = tm.tmHeight;
}
-static HWND create_rebar_control(void)
+static HWND create_rebar_control(DWORD style)
{
HWND hwnd;
- hwnd = CreateWindowA(REBARCLASSNAMEA, NULL, WS_CHILD | WS_VISIBLE, 0, 0, 0, 0,
+ hwnd = CreateWindowA(REBARCLASSNAMEA, NULL, style | WS_CHILD | WS_VISIBLE, 0, 0, 0, 0,
hMainWnd, (HMENU)17, GetModuleHandleA(NULL), NULL);
ok(hwnd != NULL, "Failed to create Rebar\n");
@@ -499,7 +499,7 @@ static void test_layout(void)
rbsize_results_init();
- hRebar = create_rebar_control();
+ hRebar = create_rebar_control(0);
check_sizes();
rbi.cbSize = REBARBANDINFOA_V6_SIZE;
rbi.fMask = RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_CHILD;
@@ -559,7 +559,7 @@ static void test_layout(void)
DestroyWindow(hRebar);
- hRebar = create_rebar_control();
+ hRebar = create_rebar_control(0);
add_band_w(hRebar, "ABC", 70, 40, 100);
add_band_w(hRebar, NULL, 40, 70, 100);
add_band_w(hRebar, NULL, 170, 240, 100);
@@ -602,7 +602,7 @@ static void test_layout(void)
DestroyWindow(hRebar);
/* VARHEIGHT resizing test on a horizontal rebar */
- hRebar = create_rebar_control();
+ hRebar = create_rebar_control(0);
SetWindowLongA(hRebar, GWL_STYLE, GetWindowLongA(hRebar, GWL_STYLE) | RBS_AUTOSIZE);
check_sizes();
rbi.fMask = RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_SIZE | RBBIM_STYLE;
@@ -630,7 +630,7 @@ static void test_layout(void)
DestroyWindow(hRebar);
/* VARHEIGHT resizing on a vertical rebar */
- hRebar = create_rebar_control();
+ hRebar = create_rebar_control(0);
SetWindowLongA(hRebar, GWL_STYLE, GetWindowLongA(hRebar, GWL_STYLE) | CCS_VERT | RBS_AUTOSIZE);
check_sizes();
rbi.fMask = RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_SIZE | RBBIM_STYLE;
@@ -661,7 +661,7 @@ static void test_layout(void)
pImageList_Destroy(himl);
/* One hidden band. */
- hRebar = create_rebar_control();
+ hRebar = create_rebar_control(0);
rbi.cbSize = REBARBANDINFOA_V6_SIZE;
rbi.fMask = RBBIM_STYLE | RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_CHILD;
@@ -966,7 +966,7 @@ static void test_bandinfo(void)
CHAR szABCD[] = "ABCD";
HWND hRebar;
- hRebar = create_rebar_control();
+ hRebar = create_rebar_control(0);
rb.cbSize = REBARBANDINFOA_V6_SIZE;
rb.fMask = 0;
if (!SendMessageA(hRebar, RB_INSERTBANDA, 0, (LPARAM)&rb))
@@ -1027,7 +1027,7 @@ static void test_colors(void)
HWND hRebar;
REBARBANDINFOA bi;
- hRebar = create_rebar_control();
+ hRebar = create_rebar_control(0);
/* test default colors */
clr = SendMessageA(hRebar, RB_GETTEXTCOLOR, 0, 0);
@@ -1106,7 +1106,7 @@ static void test_showband(void)
REBARBANDINFOA rbi;
BOOL ret;
- hRebar = create_rebar_control();
+ hRebar = create_rebar_control(0);
/* no bands */
ret = SendMessageA(hRebar, RB_SHOWBAND, 0, TRUE);
@@ -1135,7 +1135,7 @@ static void test_notification(void)
MEASUREITEMSTRUCT mis;
HWND rebar;
- rebar = create_rebar_control();
+ rebar = create_rebar_control(0);
g_parent_measureitem = 0;
SendMessageA(rebar, WM_MEASUREITEM, 0, (LPARAM)&mis);
@@ -1144,6 +1144,33 @@ static void test_notification(void)
DestroyWindow(rebar);
}
+static void test_style(void)
+{
+ STYLESTRUCT style_struct;
+ LONG style;
+ HWND hwnd;
+ RECT rect;
+
+ /* WS_BORDER */
+ hwnd = create_rebar_control(WS_BORDER);
+ ok(GetWindowLongW(hwnd, GWL_STYLE) & WS_BORDER, "Expected WS_BORDER.\n");
+
+ GetClientRect(hwnd, &rect);
+ SendMessageW(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rect);
+ ok(GetWindowLongW(hwnd, GWL_STYLE) & WS_BORDER, "Expected WS_BORDER.\n");
+
+ SendMessageW(hwnd, WM_THEMECHANGED, 0, 0);
+ style = GetWindowLongW(hwnd, GWL_STYLE);
+ ok(style & WS_BORDER, "Expected WS_BORDER.\n");
+
+ style_struct.styleOld = style;
+ style_struct.styleNew = style | WS_DLGFRAME;
+ SendMessageW(hwnd, WM_STYLECHANGED, (WPARAM)GWL_STYLE, (LPARAM)&style_struct);
+ ok(GetWindowLongW(hwnd, GWL_STYLE) & WS_BORDER, "Expected WS_BORDER.\n");
+
+ DestroyWindow(hwnd);
+}
+
static void init_functions(void)
{
HMODULE hComCtl32 = LoadLibraryA("comctl32.dll");
@@ -1176,6 +1203,7 @@ START_TEST(rebar)
test_layout();
test_resize();
+ test_style();
out:
PostQuitMessage(0);
--
2.30.2
1
0
06 Oct '21
Fix rebar test failures when theming is on.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
dlls/comctl32/rebar.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index af35008b692..84390bd0b52 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -3207,19 +3207,13 @@ REBAR_MouseMove (REBAR_INFO *infoPtr, LPARAM lParam)
static inline LRESULT
REBAR_NCCalcSize (const REBAR_INFO *infoPtr, RECT *rect)
{
- HTHEME theme;
-
if (infoPtr->dwStyle & WS_BORDER) {
rect->left = min(rect->left + GetSystemMetrics(SM_CXEDGE), rect->right);
rect->right = max(rect->right - GetSystemMetrics(SM_CXEDGE), rect->left);
rect->top = min(rect->top + GetSystemMetrics(SM_CYEDGE), rect->bottom);
rect->bottom = max(rect->bottom - GetSystemMetrics(SM_CYEDGE), rect->top);
}
- else if ((theme = GetWindowTheme (infoPtr->hwndSelf)))
- {
- /* FIXME: should use GetThemeInt */
- rect->top = min(rect->top + 1, rect->bottom);
- }
+
TRACE("new client=(%s)\n", wine_dbgstr_rect(rect));
return 0;
}
--
2.30.2
1
0
[PATCH v2 00/22] ntdll: Relax the loader locking to match newer Windows behaviour.
by Paul Gofman 06 Oct '21
by Paul Gofman 06 Oct '21
06 Oct '21
Changes from the previous version accross the patches:
- use ldr_data_srw_lock instead of introducing a new one when modifying
WINE_MODREF data with a shared loader lock.
- protect cached_modref with ldr_data_srw_lock instead of introducing interlocked access;
- remove redundant 'volatile' qualifier from locked_exclusive;
- fix and improve tests, split them across the patchset.
I actually mean to send first 7 patches from this series for review
and not 22 at once but it feels like the changes introduced by these
first patches make sense in this exact form only if the general
idea of locking rework is accepted. So I am sending the whole
thing in its current state in a hope it would be possible to see what
I am suggesting and make a decision on the general idea at least.
I did some cleanup on all the functional patches, although would
look once again at those below patch 7 at least before sending
that for review. The test in the last patch obviously needs
more work, it works well for me on the recent enough Windows 10 but not
that well yet on earlier versions, also needs cleaning up and splitting.
Some facts about the current Windows loader behaviour:
- It seems that loader lock (the one that can be managed externally
through LdrLockLoaderLock) is held only when calling the app's functions
from the loader: DLL entry point, TLS callbacks, LDR notifications and
LdrEnumerateLoadedModules callback.
There is a quirk (at least on the
newer Win10) with LDR notifications: the loader lock is held during
the unload event but not during the load event, at least the first
one. I am guessing that maybe it is unheld only until the first
dependency DLL entry point is called (so they take it once there and
then keep until process attach ends, leaving first load notification
behind), but I didn't test that with the DLL with dependencies yet.
In any case it looks to me this quirk may be left for later.
- There is apparently other lock mechanics involved as Windows
does not allow loading process of different DLLs to go in parallel;
- It looks like any function which does not end up requiring
actual loading or unloading of the DLL and does not query anything
from the module currently being loaded or unloaded can be executed in
parallel with the current load process. E. g., LoadLibrary("b.dll")
won't ever block if the DLL is already loaded, LdrAddRefDll never
blocks at all even if called for the module currently being loaded
(hanging in dll entry point process attach) or unloaded (hanging in
detach), LdrUnloadDll will only block if it decrements load count
to zero.
- The behaviour of the functions operating on the module being
currently loaded or unloaded looks quirky. Here is what I recovered
from testing on the 19043.1237 (that is mostly covered in the test
in the last patch):
- LdrUnloadDll blocks until the DLL load sequence is complete
and succeeds without waiting if unload sequence is in progress;
- LdrAddRefDll never blocks but behaviour depends on whether
it is called from the app callback (tested with entry point and LDR
notification) or outside of that (patch 0014).
- LdrGetDllHandleEx blocks during module unload but not load;
- LdrGetProcedureAddress waits until the module is being loaded
and immediately returns an error if module is being unloaded;
- Looks like calling functions from LDR notifications is the
special case. Those that wouldn't block work, but those that would
block if called from outside return error STATUS_NOT_FOUND. That is
apparently not how that behaves from DLL entry points and TLS
callbacks.
I think the main patch in the series is patch 0008 which introduces
exclusive locks downgrade / upgrade functions. The idea is that we
can take shared or exclusive lock from loader function. The exclusive
lock can be downgraded to shared. However, the thread still holds
exlusiveness in this state in a sense that other exclusive lock cannot
be taken until the initial exclusive lock is released. Shared lock
waiters can joing when the exlusive lock is downgraded. This works
recursively so loader functions can call each other and call outside
callbacks with the lock held, with the exception that exclusive lock
cannot be taken recursively if shared is currently held.
So, the way of using it is:
- Never call the callbacks with read lock held: that will assert
once the application calls some loader function which takes the
exclusive lock.
- The way to call the callbacks is to have an exclusive lock
and downgrade it to shared, then the recursive taking of exclusive
lock is ok;
- If it is unclear at function start whether exclusive lock is
needed or not, the way to go is to start from shared lock, try to
perform the operation (in case of LdrAddRefDll / LdrUnloadLibrary
I used an extra short lived SRW lock), and if that is not possible
release the shared lock and restart from scratch with exclusive.
I think maybe it would be technically possible not to introduce the
limitation and allow upgrading shared locks to exclusive but it seems
it would make things much more complicated than they are: it would
require some neater and finer grained structure access sync
to avoid invalidating all the data the shared locker depends on at
the moment it wants to upgrade to exclusive and yields to exclusive
library load / unload sequence.
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
--
2.31.1
2
29
06 Oct '21
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/mfplat/tests/mfplat.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c
index 541459c715b..1b51cd73dc3 100644
--- a/dlls/mfplat/tests/mfplat.c
+++ b/dlls/mfplat/tests/mfplat.c
@@ -1947,8 +1947,10 @@ static void test_file_stream(void)
WCHAR pathW[MAX_PATH];
DWORD caps, count;
WCHAR *filename;
+ BYTE data[8];
HRESULT hr;
WCHAR *str;
+ ULONG size;
BOOL eos;
filename = load_resource(L"test.mp4");
@@ -2023,6 +2025,31 @@ static void test_file_stream(void)
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(position == 2 * bytestream_length, "Unexpected position.\n");
+ hr = IMFByteStream_IsEndOfStream(bytestream, &eos);
+ ok(hr == S_OK, "Failed query end of stream, hr %#x.\n", hr);
+ ok(eos == TRUE, "Unexpected IsEndOfStream result, %u.\n", eos);
+
+ size = 0xdeadbeef;
+ hr = IMFByteStream_Read(bytestream, data, sizeof(data), &size);
+ todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_HANDLE_EOF), "Unexpected hr %#x.\n", hr);
+ todo_wine ok(size == 0xdeadbeef, "Got size %u.\n", size);
+
+ hr = IMFByteStream_SetCurrentPosition(bytestream, bytestream_length - 4);
+ ok(hr == S_OK, "Failed to set bytestream position, hr %#x.\n", hr);
+
+ size = 0xdeadbeef;
+ hr = IMFByteStream_Read(bytestream, data, sizeof(data), &size);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(size == 4, "Got size %u.\n", size);
+
+ hr = IMFByteStream_SetCurrentPosition(bytestream, bytestream_length);
+ ok(hr == S_OK, "Failed to set bytestream position, hr %#x.\n", hr);
+
+ size = 0xdeadbeef;
+ hr = IMFByteStream_Read(bytestream, data, sizeof(data), &size);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(!size, "Got size %u.\n", size);
+
hr = MFCreateFile(MF_ACCESSMODE_READ, MF_OPENMODE_FAIL_IF_NOT_EXIST,
MF_FILEFLAGS_NONE, filename, &bytestream2);
ok(hr == S_OK, "got 0x%08x\n", hr);
--
2.33.0
2
3