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 time
local last
repeat
time = endtime - loader.time()
screen.setcursor(x, y)
print("Autoboot in " .. time ..
" seconds, hit [Enter] to boot" ..
" or any other key to stop ")
screen.defcursor()
if last == nil or last ~= time then
last = time
screen.setcursor(x, y)
print("Autoboot in " .. time ..
" seconds, hit [Enter] to boot" ..
" or any other key to stop ")
screen.defcursor()
end
if io.ischar() then
local ch = io.getchar()
if ch == core.KEY_ENTER then