win32: do not call timeEndPeriod(1) on termination

This was called for formal reasons at best. The way it does this is
somewhat dangerous, because if libmpv is unloaded as DLL, this would
attempt to call a dangling function pointer.

(No, we don't want an extra DllMain entrypoint just for win32.)
This commit is contained in:
wm4 2015-05-21 22:52:14 +02:00
parent cbaa8d65fc
commit ac879545ad
1 changed files with 0 additions and 8 deletions

View File

@ -52,15 +52,7 @@ uint64_t mp_raw_time_us(void)
}
#endif
static void restore_timer(void)
{
// The MSDN documents that begin/end "must" be matched. This satisfies
// this requirement.
timeEndPeriod(1);
}
void mp_raw_time_init(void)
{
timeBeginPeriod(1); // request 1ms timer resolution
atexit(restore_timer);
}