dont cast "infinity" to int lel
This commit is contained in:
1 parent
beaf44040d
commit
f5ee615b2d
1 file changed
+1
-1
+1
-1
@@ -744,7 +744,7 @@ void D_SRB2Loop(void)
|
||||
|
||||
{
|
||||
// Casting the return value of a function is bad practice (apparently)
|
||||
double budget = round((1.0 / R_GetFramerateCap()) * I_GetPrecisePrecision());
|
||||
double budget = ((R_GetFramerateCap() == 0) ? 0.0 : round((1.0 / R_GetFramerateCap()) * I_GetPrecisePrecision()));
|
||||
capbudget = (precise_t) budget;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user