lualoader: Don't redraw the autoboot message every .05s

This commit is contained in:
Kyle Evans 2018-03-09 18:45:13 +00:00
parent c3d171bd18
commit 3244729fbb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330701

View File

@ -425,14 +425,17 @@ function menu.autoboot()
local endtime = loader.time() + ab local endtime = loader.time() + ab
local time local time
local last
repeat repeat
time = endtime - loader.time() time = endtime - loader.time()
screen.setcursor(x, y) if last == nil or last ~= time then
print("Autoboot in " .. time .. last = time
" seconds, hit [Enter] to boot" .. screen.setcursor(x, y)
" or any other key to stop ") print("Autoboot in " .. time ..
screen.defcursor() " seconds, hit [Enter] to boot" ..
" or any other key to stop ")
screen.defcursor()
end
if io.ischar() then if io.ischar() then
local ch = io.getchar() local ch = io.getchar()
if ch == core.KEY_ENTER then if ch == core.KEY_ENTER then