We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SolveSpace version: 3.0~39c34809
Operating system: Windows 10
The counter checks if the count is zero and prevents casting an inf to a long.
inf
long
The FPS counter overflows the long argument and displays it.
The text was updated successfully, but these errors were encountered:
What about this?
diff --git a/src/draw.cpp b/src/draw.cpp index 3f13b5d..b9ddcb4 100644 --- a/src/draw.cpp +++ b/src/draw.cpp @@ -888,7 +888,7 @@ void GraphicsWindow::Paint() { // Also display an fps counter. RgbaColor renderTimeColor; - if(1000 / renderTime.count() < 60) { + if(renderTime.count() > 16.67) { // We aim for a steady 60fps; draw the counter in red when we're slower. renderTimeColor = { 255, 0, 0, 255 }; } else { @@ -896,7 +896,7 @@ void GraphicsWindow::Paint() { } uiCanvas.DrawBitmapText(ssprintf("rendered in %ld ms (%ld 1/s)", (long)renderTime.count(), - (long)(1000/renderTime.count())), + (long)(1000 / std::max(0.1, renderTime.count()))), 5, 5, renderTimeColor); canvas->FlushFrame();
Sorry, something went wrong.
Yep, that does it!
Fixed in 9500487.
No branches or pull requests
System information
SolveSpace version: 3.0~39c34809
Operating system: Windows 10
Expected behavior
The counter checks if the count is zero and prevents casting an
inf
to along
.Actual behavior
The FPS counter overflows the
long
argument and displays it.Additional information
The text was updated successfully, but these errors were encountered: