use waitable timer also for fps limiter
This commit is contained in:
parent
435854456b
commit
97ca023f09
6 changed files with 111 additions and 44 deletions
|
@ -162,7 +162,7 @@ void LimitGameTicks()
|
|||
{
|
||||
if (ddraw->ticksLimiter.hTimer)
|
||||
{
|
||||
FILETIME ft;
|
||||
FILETIME ft = { 0 };
|
||||
GetSystemTimeAsFileTime(&ft);
|
||||
|
||||
if (CompareFileTime((FILETIME *)&ddraw->ticksLimiter.dueTime, &ft) == -1)
|
||||
|
@ -1499,6 +1499,13 @@ ULONG __stdcall ddraw_Release(IDirectDrawImpl *This)
|
|||
This->flipLimiter.hTimer = NULL;
|
||||
}
|
||||
|
||||
if (This->fpsLimiter.hTimer)
|
||||
{
|
||||
CancelWaitableTimer(This->fpsLimiter.hTimer);
|
||||
CloseHandle(This->fpsLimiter.hTimer);
|
||||
This->fpsLimiter.hTimer = NULL;
|
||||
}
|
||||
|
||||
DeleteCriticalSection(&This->cs);
|
||||
|
||||
/* restore old wndproc, subsequent ddraw creation will otherwise fail */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue