summaryrefslogtreecommitdiff
path: root/src/framebuffer.rs
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-01-18 20:46:08 -0500
committerLLLL Colonq <llll@colonq>2025-01-18 20:46:08 -0500
commit6c00c069ccf08ef5e577c16acc78a5b1f53a0f8f (patch)
treeca0cf7a5e042883cfa7fe95725d8eda35860d56e /src/framebuffer.rs
parent82d1c94d999654bda5d40108393eade80b77342c (diff)
Rework font rendering, configurable resolution
Diffstat (limited to 'src/framebuffer.rs')
-rw-r--r--src/framebuffer.rs6
1 files changed, 3 insertions, 3 deletions
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 {