mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
compatibility with winXP. .bmp loader now handles 32-bit images and more modern headers.
This commit is contained in:
@@ -70,7 +70,11 @@ double GetFPS()
|
||||
void ResetTimers()
|
||||
{
|
||||
// double CurrentTime=
|
||||
#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
|
||||
::GetTickCount64();
|
||||
#else
|
||||
::GetTickCount();
|
||||
#endif
|
||||
DeltaTime = 0.1;
|
||||
DeltaRenderTime = 0;
|
||||
fSoundTimer = 0;
|
||||
@@ -102,7 +106,11 @@ void UpdateTimers(bool pause)
|
||||
oldCount = count;
|
||||
|
||||
// Keep track of the time lapse and frame count
|
||||
#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
|
||||
double fTime = ::GetTickCount64() * 0.001f; // Get current time in seconds
|
||||
#else
|
||||
double fTime = ::GetTickCount() * 0.001f; // Get current time in seconds
|
||||
#endif
|
||||
++dwFrames; // licznik ramek
|
||||
// update the frame rate once per second
|
||||
if (fTime - fLastTime > 1.0f)
|
||||
|
||||
Reference in New Issue
Block a user