Changed loggin to only log when enabled with logPrint function
This commit is contained in:
4
main.lua
4
main.lua
@@ -57,7 +57,7 @@ function love.load()
|
||||
gravity = 0.2
|
||||
-- Debug and log stuff
|
||||
memoryUsage, dtcount = 0, 0
|
||||
if logging then print("mothback: "..collectgarbage("count").." kB, Loading time: "..os.clock().." seconds") end
|
||||
logPrint("mothback: "..collectgarbage("count").." kB, Loading time: "..os.clock().." seconds")
|
||||
end
|
||||
|
||||
function love.update(dt)
|
||||
@@ -81,7 +81,7 @@ function love.update(dt)
|
||||
if debug or logging then
|
||||
memoryUsage = math.floor(collectgarbage("count"))
|
||||
end
|
||||
if logging then print("Second "..secs..": "..memoryUsage.." kB") end
|
||||
logPrint("Second "..secs..": "..memoryUsage.." kB")
|
||||
end
|
||||
|
||||
--keypressed
|
||||
|
||||
Reference in New Issue
Block a user