forked from AbleOS/ableos
framebuffer is ?^Color now.
This commit is contained in:
parent
d19f15aa5c
commit
e3ec34684f
|
@ -1,5 +1,6 @@
|
|||
.{Vec2} := @
|
||||
.{math, buffer} := @use("../../stn/src/lib.hb");
|
||||
|
||||
get_pos := fn(): Vec2(uint) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ free_surface := fn(surface: Surface): void {
|
|||
return @inline(memory.free, Color, surface.buf, @intcast(surface.width * surface.height), false)
|
||||
}
|
||||
|
||||
framebuffer := @as(^Color, null)
|
||||
framebuffer := @as(?^Color, null)
|
||||
|
||||
init := fn(doublebuffer: bool): Surface {
|
||||
framebuffer = dt.get(^Color, "framebuffer/fb0/ptr\0")
|
||||
|
@ -55,6 +55,9 @@ clear := fn(surface: Surface, color: Color): void {
|
|||
|
||||
sync := fn(surface: Surface): void {
|
||||
// vague safety
|
||||
if framebuffer == null {
|
||||
return
|
||||
}
|
||||
if surface.buf == framebuffer {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -26,8 +26,8 @@ resolution = "1600x900x24"
|
|||
# [boot.limine.ableos.modules.diskio_driver]
|
||||
# path = "boot:///diskio_driver.hbf"
|
||||
|
||||
# [boot.limine.ableos.modules.render_example]
|
||||
# path = "boot:///render_example.hbf"
|
||||
[boot.limine.ableos.modules.render_example]
|
||||
path = "boot:///render_example.hbf"
|
||||
|
||||
# [boot.limine.ableos.modules.serial_driver]
|
||||
# path = "boot:///serial_driver.hbf"
|
||||
|
@ -56,8 +56,8 @@ resolution = "1600x900x24"
|
|||
# [boot.limine.ableos.modules.pumpkin_print]
|
||||
# path = "boot:///pumpkin_print.hbf"
|
||||
|
||||
[boot.limine.ableos.modules.mouse_driver]
|
||||
path = "boot:///mouse_driver.hbf"
|
||||
# [boot.limine.ableos.modules.mouse_driver]
|
||||
# path = "boot:///mouse_driver.hbf"
|
||||
|
||||
# [boot.limine.ableos.modules.mouse_test]
|
||||
# path = "boot:///mouse_test.hbf"
|
||||
|
|
Loading…
Reference in a new issue