diff options
| author | hachem <im@hachem.wtf> | 2026-09-25 21:21:09 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-09-25 21:21:09 +0200 |
| commit | 09982d80c45805715984cc1cae96c37e4fc148c3 (patch) | |
| tree | f711d6e7f4d4cb2d4dcb555d6a139aae343d7334 /boot/framebuffer.zig | |
| parent | fd3f51eecaecc12806a573c38263df1de43ee8c2 (diff) | |
feat: scheduler + cleanup
Diffstat (limited to 'boot/framebuffer.zig')
| -rw-r--r-- | boot/framebuffer.zig | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/boot/framebuffer.zig b/boot/framebuffer.zig index b82e5af..e541458 100644 --- a/boot/framebuffer.zig +++ b/boot/framebuffer.zig @@ -9,18 +9,11 @@ pub const Framebuffer = limine.Framebuffer; // idk why this sounds vaguely erotic, like yeah fill me harder lol export var request: limine.FramebufferRequest linksection(".limine_requests") = .{}; -// the response pointer is written by Limine before we run, so read it through a -// volatile pointer or the optimizer assumes it's still null +// the response pointer is written by limine before we run, so read it through a +// volatile pointer or the optimizer assumes its still null pub fn get() ?*Framebuffer { const req: *volatile limine.FramebufferRequest = &request; const resp = req.response orelse return null; if (resp.framebuffer_count == 0) return null; return resp.framebuffers.?[0]; } - -// assumes the usual Limine RGB 32-bpp layout im sure i wont forget about this layout -// later and it wont fuck me over -pub fn putpixel(fb: *Framebuffer, x: usize, y: usize, color: u32) void { - const pixel: *align(1) u32 = @ptrCast(fb.address + y * fb.pitch + x * 4); - pixel.* = color; -} |
