winmm: Handle GetTickCount overflow in MIDI player.

This commit is contained in:
Jörg Höhle 2013-02-14 07:39:50 +01:00 committed by Alexandre Julliard
parent ab6bb56988
commit f67bc43e22
1 changed files with 2 additions and 2 deletions

View File

@ -1143,8 +1143,8 @@ start_header:
dwToGo = lpMidiStrm->dwStartTicks + lpMidiStrm->dwPositionMS;
TRACE("%d/%d/%d\n", dwToGo, GetTickCount(), me->dwDeltaTime);
while ((dwCurrTC = GetTickCount()) < dwToGo) {
TRACE("%u/%u/%u\n", dwToGo, GetTickCount(), me->dwDeltaTime);
while (dwToGo - (dwCurrTC = GetTickCount()) <= MAXLONG) {
if (MsgWaitForMultipleObjects(0, NULL, FALSE, dwToGo - dwCurrTC, QS_ALLINPUT) == WAIT_OBJECT_0) {
/* got a message, handle it */
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) {