Commit 3db2e911 authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

winmm: Allow calling joyReleaseCapture multiple times.

parent 45f46bd3
......@@ -279,11 +279,14 @@ MMRESULT WINAPI joyReleaseCapture(UINT wID)
if (wID >= MAXJOYSTICK) return JOYERR_PARMS;
if (!JOY_LoadDriver(wID)) return MMSYSERR_NODRIVER;
if (!JOY_Sticks[wID].hCapture) return JOYERR_NOCANDO;
KillTimer(JOY_Sticks[wID].hCapture, JOY_Sticks[wID].wTimer);
JOY_Sticks[wID].hCapture = 0;
JOY_Sticks[wID].wTimer = 0;
if (JOY_Sticks[wID].hCapture)
{
KillTimer(JOY_Sticks[wID].hCapture, JOY_Sticks[wID].wTimer);
JOY_Sticks[wID].hCapture = 0;
JOY_Sticks[wID].wTimer = 0;
}
else
TRACE("Joystick is not captured, ignoring request.\n");
return JOYERR_NOERROR;
}
......
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