From bd19fc17e261a03dc8ea1ed1a732c570dd925157 Mon Sep 17 00:00:00 2001 From: j0code <42189560+j0code@users.noreply.github.com> Date: Thu, 29 Feb 2024 02:42:01 +0100 Subject: [PATCH] debugscreen memalloc fix --- src/util/Container.ts | 2 +- src/util/DebugScreen.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/Container.ts b/src/util/Container.ts index e6b29b6..bb74d5c 100644 --- a/src/util/Container.ts +++ b/src/util/Container.ts @@ -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 diff --git a/src/util/DebugScreen.ts b/src/util/DebugScreen.ts index 680d202..9576688 100644 --- a/src/util/DebugScreen.ts +++ b/src/util/DebugScreen.ts @@ -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}`)