Skip to content
Snippets Groups Projects
Commit 64f600fe authored by André Zwing's avatar André Zwing Committed by Alexandre Julliard
Browse files

winmm: Respect return value from joyGetPos (Coverity).

parent bbc42a23
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,7 @@ static void CALLBACK JOY_Timer(HWND hWnd, UINT wMsg, UINT_PTR wTimer, DWORD dwTi
{
int i;
WINE_JOYSTICK* joy;
MMRESULT res;
JOYINFO ji;
LONG pos;
unsigned buttonChange;
......@@ -93,7 +94,12 @@ static void CALLBACK JOY_Timer(HWND hWnd, UINT wMsg, UINT_PTR wTimer, DWORD dwTi
if (joy->hCapture != hWnd) continue;
joyGetPos(i, &ji);
res = joyGetPos(i, &ji);
if (res != JOYERR_NOERROR) {
WARN("joyGetPos failed: %08x\n", res);
continue;
}
pos = MAKELONG(ji.wXpos, ji.wYpos);
if (!joy->bChanged ||
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment