Skip to content

Commit

Permalink
debugscreen memalloc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
j0code committed Feb 29, 2024
1 parent 843638e commit bd19fc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/util/Container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Graphics from "../Graphics.js"
import Inventory from "../Inventory.js"
import ItemStack from "../ItemStack.js"
import Dim2 from "../dim/Dim2.js"
import { createBlock, game, getTexture, input, player } from "../main.js"
import { game, getTexture, input, player } from "../main.js"
import Texture from "../texture/Texture.js"

let slot: Texture
Expand Down
2 changes: 1 addition & 1 deletion src/util/DebugScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function envInfo(g: Graphics) { // some of this might break

if (memUsage) lines.push(`Mem: ${(memUsage / memTotal * 100).toFixed(1)}% ${memUsage.toFixed(1)}/${memTotal}MiB`)
else lines.push(`Mem: ${memTotal || 0}GiB`)
if (memAllocated) lines.push(`Allocated: ${(memAllocated / memTotal * 100).toFixed(1)}% ${memUsage.toFixed(1)}MiB`)
if (memAllocated) lines.push(`Allocated: ${(memAllocated / memTotal * 100).toFixed(1)}% ${memAllocated.toFixed(1)}MiB`)

lines.push(`Display: ${game.width}x${game.height}`)

Expand Down

0 comments on commit bd19fc1

Please sign in to comment.