mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-15 02:26:44 -04:00
Fixed the build system for Linux
This commit is contained in:
parent
aa50ab78ec
commit
6393955683
11 changed files with 103 additions and 43 deletions
|
@ -264,8 +264,9 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
|||
/* Find the timedelta */
|
||||
QueryPerformanceCounter(&CurrentTime);
|
||||
TimeDelta = (float)(CurrentTime.QuadPart-PreviousTime.QuadPart)/ClockFreq.QuadPart;
|
||||
if(TimeDelta < 0) TimeDelta = 0; /* Safe-guard in case of system delay */
|
||||
PreviousTime = CurrentTime;
|
||||
if(TimeDelta < 0 || TimeDelta > 5) /* Safe-guard in case of system delay */
|
||||
continue;
|
||||
|
||||
/* Draw */
|
||||
Demo.DrawScene(TimeDelta, keys);
|
||||
|
@ -275,6 +276,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
|||
QueryPerformanceCounter(&CurrentTime);
|
||||
TimeDelta = (float)(CurrentTime.QuadPart-PreviousTime.QuadPart)/ClockFreq.QuadPart;
|
||||
TimeDelta = (FramePeriod - TimeDelta) * 1000;
|
||||
if(TimeDelta > 1) Sleep((unsigned) TimeDelta);
|
||||
if(TimeDelta > 1 && TimeDelta < 100) Sleep((unsigned) TimeDelta);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue