Fixed timer bug

This commit is contained in:
pagefault
2001-05-22 17:40:06 +00:00
parent 1b4b249037
commit 83118af42e
2 changed files with 16 additions and 0 deletions

View File

@@ -176,6 +176,7 @@ EXTSYM numlockptr
%ifdef __WIN32__ %ifdef __WIN32__
EXTSYM CheckPriority EXTSYM CheckPriority
EXTSYM CheckAlwaysOnTop EXTSYM CheckAlwaysOnTop
EXTSYM ReInitTimer
%endif %endif
%ifdef __LINUX__ %ifdef __LINUX__
EXTSYM numlockptr EXTSYM numlockptr
@@ -3320,6 +3321,7 @@ DisplayBoxes:
%ifdef __WIN32__ %ifdef __WIN32__
pushad pushad
call CheckPriority call CheckPriority
call ReInitTimer
popad popad
%endif %endif
jmp .finstuff jmp .finstuff

View File

@@ -219,6 +219,20 @@ extern "C" void MinimizeWindow()
IsMinimized = TRUE; IsMinimized = TRUE;
} }
extern "C" void ReInitTimer()
{
if (AlternateTimer == 0)
{
QueryPerformanceCounter((LARGE_INTEGER*)&start);
QueryPerformanceCounter((LARGE_INTEGER*)&start2);
}
else
{
start = timeGetTime();
start2 = timeGetTime();
}
}
extern "C" BYTE MouseWheel; extern "C" BYTE MouseWheel;
BOOL InputRead(void) BOOL InputRead(void)