From 6c00c069ccf08ef5e577c16acc78a5b1f53a0f8f Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Sat, 18 Jan 2025 20:46:08 -0500 Subject: Rework font rendering, configurable resolution --- src/framebuffer.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/framebuffer.rs') diff --git a/src/framebuffer.rs b/src/framebuffer.rs index 6d8d1b5..ae96d6a 100644 --- a/src/framebuffer.rs +++ b/src/framebuffer.rs @@ -18,9 +18,9 @@ impl Framebuffer { let (w, h) = ctx.window.size(); (w as f32, h as f32) }; - let ratio = context::compute_upscale(windoww as _, windowh as _) as f32; - let upscalew = context::RENDER_WIDTH * ratio; - let upscaleh = context::RENDER_HEIGHT * ratio; + let ratio = ctx.compute_upscale(windoww as _, windowh as _) as f32; + let upscalew = ctx.render_width * ratio; + let upscaleh = ctx.render_height * ratio; let offsetx = (windoww - upscalew) / 2.0; let offsety = (windowh - upscaleh) / 2.0; Self { -- cgit v1.2.3