Michael Stefaniuc : dinput/tests: Use wide-char string literals.
Alexandre Julliard
julliard at winehq.org
Wed Oct 7 16:04:09 CDT 2020
Module: wine
Branch: master
Commit: 64ee238016ea70564e7623aeb2a4dc3f0188c32d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=64ee238016ea70564e7623aeb2a4dc3f0188c32d
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Wed Oct 7 00:52:01 2020 +0200
dinput/tests: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dinput/tests/joystick.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/dlls/dinput/tests/joystick.c b/dlls/dinput/tests/joystick.c
index f082c612b0..8a3e5e3022 100644
--- a/dlls/dinput/tests/joystick.c
+++ b/dlls/dinput/tests/joystick.c
@@ -405,17 +405,13 @@ static BOOL CALLBACK EnumJoysticks(const DIDEVICEINSTANCEA *lpddi, void *pvRef)
ok(SUCCEEDED(hr), "IDirectInput_GetProperty() for DIPROP_GUIDANDPATH failed: %08x\n", hr);
{
- static const WCHAR formatW[] = {'\\','\\','?','\\','%','*','[','^','#',']','#','v','i','d','_',
- '%','0','4','x','&','p','i','d','_','%','0','4','x',0};
- static const WCHAR miW[] = {'m','i','_',0};
- static const WCHAR igW[] = {'i','g','_',0};
int vid, pid;
_wcslwr(dpg.wszPath);
- count = swscanf(dpg.wszPath, formatW, &vid, &pid);
+ count = swscanf(dpg.wszPath, L"\\\\?\\%*[^#]#vid_%04x&pid_%04x", &vid, &pid);
ok(count == 2, "DIPROP_GUIDANDPATH path has wrong format. Expected count: 2 Got: %i Path: %s\n",
count, wine_dbgstr_w(dpg.wszPath));
- ok(wcsstr(dpg.wszPath, miW) != 0 || wcsstr(dpg.wszPath, igW) != 0,
+ ok(wcsstr(dpg.wszPath, L"mi_") != 0 || wcsstr(dpg.wszPath, L"ig_") != 0,
"DIPROP_GUIDANDPATH path should contain either 'ig_' or 'mi_' substring. Path: %s\n",
wine_dbgstr_w(dpg.wszPath));
}
More information about the wine-cvs
mailing list