diff options
Diffstat (limited to 'src/sysapp')
-rw-r--r-- | src/sysapp/login/main.lua | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/sysapp/login/main.lua b/src/sysapp/login/main.lua index dec8b82..50ecd20 100644 --- a/src/sysapp/login/main.lua +++ b/src/sysapp/login/main.lua @@ -1,6 +1,7 @@ local sys = require 'lx.sys' local sysdef= require 'lx.sysdef' local ioctl = require 'lx.ioctl' +local draw = require 'lx.draw' print("Hello, world!") @@ -10,11 +11,22 @@ print("vesa_fd = " .. vesa_fd) local vesa_info = ioctl.fb_get_info(vesa_fd) print("vesa_info = ", vesa_info) +local surface = draw.from_fd(vesa_fd, vesa_info) +for x = 0, 255 do + for y = 0, 255 do + surface:plot(x, y, surface:rgb(x, y, 0)) + end +end + local i = 1 while true do - print(i) + surface:plot(i % (vesa_info.width-3), + i % (vesa_info.height-1), + surface:rgb(i % 256, + (i + 96) % 256, + (i + 2*96) % 256)) i = i + 1 - sys.usleep(1000000) + if i % 100000 == 0 then print(i) end end os.exit() |