Commit f7ca911a authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winmm: Use a separate last_check for joyGetDevCapsW and joyGetPosEx.

Fixing spurious tests failures on the testbot.
parent 1d5e6d23
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment