From 26954cbc60aaa37566eef9ba99712fe7de8fff2f Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Sun, 21 Jan 2024 13:00:31 +0000 Subject: [PATCH] Update RootView.mc Memory usage decimal place was never used due to integer arithmetic. A single character changes fixed that. --- source/RootView.mc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/RootView.mc b/source/RootView.mc index 478c4fc..1fc3403 100644 --- a/source/RootView.mc +++ b/source/RootView.mc @@ -139,7 +139,7 @@ class RootView extends ScalableView { mMenuStatus.draw(dc); mMemText.draw(dc); var stats = System.getSystemStats(); - var memUsed = (100 * stats.usedMemory) / stats.totalMemory; + var memUsed = (100f * stats.usedMemory) / stats.totalMemory; mMemStatus.setText(memUsed.format("%.1f") + "%"); if (stats.usedMemory > Globals.scLowMem * stats.totalMemory) { mMemStatus.setColor(Graphics.COLOR_RED);