Commit e7ba995b authored by Laurent Aimar's avatar Laurent Aimar

Fixed mwait for windows.

SleepEx expects a duration in milli second.
parent 7cc631ac
......@@ -342,15 +342,16 @@ void mwait( mtime_t date )
}
#elif defined (WIN32)
mtime_t total;
mtime_t i_total;
while ((total = (date - mdate ())) > 0)
while( (i_total = (date - mdate())) > 0 )
{
DWORD delay = (total > 0x7fffffff) ? 0x7fffffff : total;
vlc_testcancel ();
SleepEx (delay, TRUE);
const mtime_t i_sleep = i_total / 1000;
DWORD i_delay = (i_sleep > 0x7fffffff) ? 0x7fffffff : i_sleep;
vlc_testcancel();
SleepEx( i_delay, TRUE );
}
vlc_testcancel ();
vlc_testcancel();
#else
mtime_t delay = date - mdate();
......
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