mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-10 09:19:01 +00:00
Fix a divide-by-zero crash in the 3ds Max plugins on really fast PCs
This commit is contained in:
parent
a744fa912e
commit
b6c869f072
1 changed files with 2 additions and 1 deletions
|
@ -1271,7 +1271,8 @@ void CObjectViewer::go ()
|
||||||
// Calc FPS
|
// Calc FPS
|
||||||
static sint64 lastTime=NLMISC::CTime::getPerformanceTime ();
|
static sint64 lastTime=NLMISC::CTime::getPerformanceTime ();
|
||||||
sint64 newTime=NLMISC::CTime::getPerformanceTime ();
|
sint64 newTime=NLMISC::CTime::getPerformanceTime ();
|
||||||
float fps = (float)(1.0 / NLMISC::CTime::ticksToSecond (newTime-lastTime));
|
sint64 timeDiff = newTime - lastTime;
|
||||||
|
float fps = timeDiff > 0 ? (float)(1.0 / NLMISC::CTime::ticksToSecond (newTime-lastTime)) : 1000.0f;
|
||||||
lastTime=newTime;
|
lastTime=newTime;
|
||||||
char msgBar[1024];
|
char msgBar[1024];
|
||||||
uint nbPlayingSources, nbSources;
|
uint nbPlayingSources, nbSources;
|
||||||
|
|
Loading…
Reference in a new issue