From fd8d781c8ddf25bb8ac207640f7a4af4b0fa5f55 Mon Sep 17 00:00:00 2001 From: RDW Date: Sat, 18 Oct 2025 01:01:10 +0200 Subject: [PATCH] UI: Fix the displayed OS page size (wrong unit) Windows returns it in bytes, not KB. The debug UI should obviously display 4 KB and not 4096. --- Core/Platforms/Win32/DebugDraw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/Platforms/Win32/DebugDraw.cpp b/Core/Platforms/Win32/DebugDraw.cpp index 1bd7309e..b135e7b5 100644 --- a/Core/Platforms/Win32/DebugDraw.cpp +++ b/Core/Platforms/Win32/DebugDraw.cpp @@ -975,7 +975,7 @@ INTERNAL void DebugDrawProcessorUsageOverlay(HDC& displayDeviceContext) { lineY += DEBUG_OVERLAY_LINE_HEIGHT; lineY += DEBUG_OVERLAY_MARGIN_SIZE; - StringCbPrintfA(formatBuffer, FORMAT_BUFFER_SIZE, "Page Size: %u KB (Allocation Granularity: %u KB)", CPU_PERFORMANCE_INFO.pageSize, CPU_PERFORMANCE_INFO.allocationGranularity / Kilobytes(1)); + StringCbPrintfA(formatBuffer, FORMAT_BUFFER_SIZE, "Page Size: %u KB (Allocation Granularity: %u KB)", CPU_PERFORMANCE_INFO.pageSize / Kilobytes(1), CPU_PERFORMANCE_INFO.allocationGranularity / Kilobytes(1)); TextOutA(displayDeviceContext, startX + DEBUG_OVERLAY_PADDING_SIZE, lineY, formatBuffer, lstrlenA(formatBuffer)); lineY += DEBUG_OVERLAY_LINE_HEIGHT;