Module: wine Branch: master Commit: f3e9a1b789289f6728737c0a4d74b9e87fda5c39 URL: https://gitlab.winehq.org/wine/wine/-/commit/f3e9a1b789289f6728737c0a4d74b9e...
Author: Alex Henrie alexhenrie24@gmail.com Date: Wed Nov 16 21:23:45 2022 -0700
dinput/tests: Get rid of pDirectInputCreateEx.
DirectInputCreateEx is available on all versions of Windows since XP at least.
---
dlls/dinput/tests/dinput.c | 16 +++++----------- dlls/dinput/tests/dinput_test.h | 1 - dlls/dinput/tests/hid.c | 2 -- 3 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/dlls/dinput/tests/dinput.c b/dlls/dinput/tests/dinput.c index 7df8f3ace85..682a5cbf97f 100644 --- a/dlls/dinput/tests/dinput.c +++ b/dlls/dinput/tests/dinput.c @@ -315,14 +315,8 @@ static void test_DirectInputCreateEx( DWORD version ) HRESULT hr; int i;
- if (!pDirectInputCreateEx) - { - win_skip("DirectInputCreateEx is not available\n"); - return; - } - unknown = (void *)0xdeadbeef; - hr = pDirectInputCreateEx( instance, version, &IID_IDirectInputW, (void **)&unknown, &outer ); + hr = DirectInputCreateEx( instance, version, &IID_IDirectInputW, (void **)&unknown, &outer ); ok( hr == DI_OK, "DirectInputCreateW returned %#lx\n", hr ); ok( unknown == NULL, "got IUnknown %p\n", unknown );
@@ -330,8 +324,8 @@ static void test_DirectInputCreateEx( DWORD version ) { winetest_push_context( "%u", i ); unknown = (void *)0xdeadbeef; - hr = pDirectInputCreateEx( create_tests[i].instance, create_tests[i].version, create_tests[i].iid, - (void **)create_tests[i].out, NULL ); + hr = DirectInputCreateEx( create_tests[i].instance, create_tests[i].version, create_tests[i].iid, + (void **)create_tests[i].out, NULL ); todo_wine_if( version == 0x300 && i == 7 ) ok( hr == create_tests[i].expected_hr, "DirectInputCreateEx returned %#lx\n", hr ); if (SUCCEEDED(hr)) IUnknown_Release( unknown ); @@ -343,7 +337,7 @@ static void test_DirectInputCreateEx( DWORD version ) { winetest_push_context( "%u", i ); unknown = (void *)0xdeadbeef; - hr = pDirectInputCreateEx( instance, version, dinput8_interfaces[i], (void **)&unknown, NULL ); + hr = DirectInputCreateEx( instance, version, dinput8_interfaces[i], (void **)&unknown, NULL ); ok( hr == DIERR_NOINTERFACE, "DirectInputCreateEx returned %#lx\n", hr ); ok( unknown == (void *)0xdeadbeef, "got IUnknown %p\n", unknown ); winetest_pop_context(); @@ -353,7 +347,7 @@ static void test_DirectInputCreateEx( DWORD version ) { winetest_push_context( "%u", i ); unknown = NULL; - hr = pDirectInputCreateEx( instance, version, dinput7_interfaces[i], (void **)&unknown, NULL ); + hr = DirectInputCreateEx( instance, version, dinput7_interfaces[i], (void **)&unknown, NULL ); if (version < 0x800) ok( hr == DI_OK, "DirectInputCreateEx returned %#lx\n", hr ); else ok( hr == DIERR_OLDDIRECTINPUTVERSION, "DirectInputCreateEx returned %#lx\n", hr ); if (version < 0x800) ok( unknown != NULL, "got IUnknown NULL\n" ); diff --git a/dlls/dinput/tests/dinput_test.h b/dlls/dinput/tests/dinput_test.h index 04738cffb44..94c3df3710c 100644 --- a/dlls/dinput/tests/dinput_test.h +++ b/dlls/dinput/tests/dinput_test.h @@ -50,7 +50,6 @@ extern const GUID expect_guid_product; extern const WCHAR expect_path[]; extern const WCHAR expect_path_end[];
-extern typeof(DirectInputCreateEx) *pDirectInputCreateEx; extern HANDLE device_added, device_removed; extern HINSTANCE instance; extern BOOL localized; /* object names get translated */ diff --git a/dlls/dinput/tests/hid.c b/dlls/dinput/tests/hid.c index 5467af32493..88565283735 100644 --- a/dlls/dinput/tests/hid.c +++ b/dlls/dinput/tests/hid.c @@ -60,7 +60,6 @@
#include "dinput_test.h"
-typeof(DirectInputCreateEx) *pDirectInputCreateEx; HINSTANCE instance; BOOL localized; /* object names get translated */
@@ -3483,7 +3482,6 @@ void dinput_test_init_( const char *file, int line ) instance = GetModuleHandleW( NULL ); localized = GetUserDefaultLCID() != MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT); pSignerSign = (void *)GetProcAddress( LoadLibraryW( L"mssign32" ), "SignerSign" ); - pDirectInputCreateEx = (void *)GetProcAddress( LoadLibraryW(L"dinput.dll"), "DirectInputCreateEx" );
if (IsWow64Process( GetCurrentProcess(), &is_wow64 ) && is_wow64) {