From a6a9e3ac72778dab9cb057d70379a3643f8c8048 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 17 Mar 2023 11:26:14 -0500 Subject: [PATCH] chore(imgui): change size of histogram --- src/imgui.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/imgui.zig b/src/imgui.zig index 259bc2c..aa17166 100644 --- a/src/imgui.zig +++ b/src/imgui.zig @@ -21,8 +21,8 @@ const gba_height = @import("core/ppu.zig").height; const log = std.log.scoped(.Imgui); -// TODO: Document how I decided on this value (I forgot 😅) -const histogram_len = 0x400; +// two seconds worth of fps values into the past +const histogram_len = 0x80; /// Immediate-Mode GUI State pub const State = struct { @@ -130,7 +130,7 @@ pub fn draw(state: *State, tex_id: GLuint, cpu: *Arm7tdmi) void { defer zgui.end(); const tmp = blk: { - var buf: [0x400]u32 = undefined; + var buf: [histogram_len]u32 = undefined; const len = state.fps_hist.copy(&buf); break :blk .{ buf, len };