diff --git a/sysdata/libraries/mouse/src/mouse.hb b/sysdata/libraries/mouse/src/mouse.hb index ea5273b..82a6d61 100644 --- a/sysdata/libraries/mouse/src/mouse.hb +++ b/sysdata/libraries/mouse/src/mouse.hb @@ -1,5 +1,6 @@ -.{Vec2} := @ +.{math, buffer} := @use("../../stn/src/lib.hb"); get_pos := fn(): Vec2(uint) { -} \ No newline at end of file +} + diff --git a/sysdata/libraries/render/src/software.hb b/sysdata/libraries/render/src/software.hb index ed1881a..8f7eadc 100644 --- a/sysdata/libraries/render/src/software.hb +++ b/sysdata/libraries/render/src/software.hb @@ -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 } diff --git a/sysdata/system_config.toml b/sysdata/system_config.toml index b5575d3..8512a52 100644 --- a/sysdata/system_config.toml +++ b/sysdata/system_config.toml @@ -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"