Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bitver
Copy link
Contributor

@bitver bitver commented May 2, 2025

feat: vibe coded fps counter and graph


// Draws FPS stats: 1% low, current frame, average, and current FPS
func (s *RenderOverlaySystem) drawCustomFPS(x, y int32) {
fps := int32(s.currentFPS)

Check failure

Code scanning / gosec

integer overflow conversion uint64 -> uint32 Error

integer overflow conversion int -> int32
}

avgFPS := int32(s.avgFPS)
percentileFPS := int32(s.percentileFPS)

Check failure

Code scanning / gosec

integer overflow conversion uint64 -> int Error

integer overflow conversion int -> int32
}

// Calculate positions (note: for ms, higher value = worse performance, so we scale directly)
x1 := x + int32(i)

Check failure

Code scanning / gosec

integer overflow conversion uint64 -> uint32 Error

integer overflow conversion int -> int32
// Calculate positions (note: for ms, higher value = worse performance, so we scale directly)
x1 := x + int32(i)
y1 := y + int32(float32(fpsGraphHeight)*(ms1/msGraphMaxValue))
x2 := x + int32(i+1)

Check failure

Code scanning / gosec

integer overflow conversion uint64 -> uint32 Error

integer overflow conversion int -> int32
}

// Draw a vertical line indicating the current position in the buffer
currentX := x + int32(len(s.msHistory)-1)

Check failure

Code scanning / gosec

integer overflow conversion uint64 -> uint32 Error

integer overflow conversion int -> int32
@milanjrodd milanjrodd merged commit b66ec1f into rodd-oss:new-api May 3, 2025
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants