Add an FPS counter

This commit is contained in:
Ishaan Bhardwaj 2021-10-18 23:27:54 -04:00
parent 0a2e16ab2c
commit aa56248e34

View File

@ -78,7 +78,10 @@ function love.draw()
if config.gamesettings.display_gamemode == 1 or scene.title == "Title" then if config.gamesettings.display_gamemode == 1 or scene.title == "Title" then
love.graphics.setFont(font_3x5_2) love.graphics.setFont(font_3x5_2)
love.graphics.setColor(1, 1, 1, 1) love.graphics.setColor(1, 1, 1, 1)
love.graphics.printf(version, 0, 460, 635, "right") love.graphics.printf(
string.format("%.2f", 1 / love.timer.getAverageDelta()) ..
"fps - " .. version, 0, 460, 635, "right"
)
end end
love.graphics.pop() love.graphics.pop()