Module: wine Branch: master Commit: f7ca911a6b2f24cafa1f32c47d70359c41a5a656 URL: https://gitlab.winehq.org/wine/wine/-/commit/f7ca911a6b2f24cafa1f32c47d70359...
Author: Rémi Bernon rbernon@codeweavers.com Date: Wed Nov 2 13:11:30 2022 +0100
winmm: Use a separate last_check for joyGetDevCapsW and joyGetPosEx.
Fixing spurious tests failures on the testbot.
---
dlls/winmm/joystick.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/winmm/joystick.c b/dlls/winmm/joystick.c index 428593fa590..572cbb82e90 100644 --- a/dlls/winmm/joystick.c +++ b/dlls/winmm/joystick.c @@ -136,7 +136,6 @@ struct joystick static DIDEVICEINSTANCEW instances[16]; static struct joystick joysticks[16]; static IDirectInput8W *dinput; -static ULONG last_check;
static BOOL CALLBACK enum_instances( const DIDEVICEINSTANCEW *instance, void *context ) { @@ -313,6 +312,7 @@ UINT WINAPI DECLSPEC_HOTPATCH joyGetNumDevs(void) */ MMRESULT WINAPI DECLSPEC_HOTPATCH joyGetDevCapsW( UINT_PTR id, JOYCAPSW *caps, UINT size ) { + static ULONG last_check; DIDEVICEOBJECTINSTANCEW instance = {.dwSize = sizeof(DIDEVICEOBJECTINSTANCEW)}; DIDEVCAPS dicaps = {.dwSize = sizeof(DIDEVCAPS)}; DIPROPDWORD diprop = @@ -464,6 +464,7 @@ MMRESULT WINAPI DECLSPEC_HOTPATCH joyGetDevCapsA( UINT_PTR id, JOYCAPSA *caps, U */ MMRESULT WINAPI DECLSPEC_HOTPATCH joyGetPosEx( UINT id, JOYINFOEX *info ) { + static ULONG last_check; DWORD i, ticks = GetTickCount(); MMRESULT res = JOYERR_NOERROR; IDirectInputDevice8W *device;