Fix page_size
This commit is contained in:
parent
5969034160
commit
3dec7b42a1
2 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ pub const Framebuffer = struct {
|
||||||
const Self = @This();
|
const Self = @This();
|
||||||
|
|
||||||
file: std.fs.File,
|
file: std.fs.File,
|
||||||
data: []align(std.mem.page_size) u8,
|
data: []align(std.heap.page_size_min) u8,
|
||||||
|
|
||||||
xres: u32,
|
xres: u32,
|
||||||
yres: u32,
|
yres: u32,
|
||||||
|
|
|
@ -20,7 +20,7 @@ pub fn vscreeninfo(fd: std.posix.fd_t) std.posix.UnexpectedError!c.fb_var_screen
|
||||||
return vinfo;
|
return vinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn mmap_fb(fd: std.posix.fd_t, vinfo: c.fb_var_screeninfo) ![]align(std.mem.page_size) u8 {
|
pub fn mmap_fb(fd: std.posix.fd_t, vinfo: c.fb_var_screeninfo) ![]align(std.heap.page_size_min) u8 {
|
||||||
const data_size: usize = vinfo.xres * vinfo.yres * (vinfo.bits_per_pixel / 8);
|
const data_size: usize = vinfo.xres * vinfo.yres * (vinfo.bits_per_pixel / 8);
|
||||||
const data = try std.posix.mmap(
|
const data = try std.posix.mmap(
|
||||||
null,
|
null,
|
||||||
|
|
Loading…
Reference in a new issue