View | Details | Raw Unified | Return to bug 231610 | Differences between
and this patch

Collapse All | Expand All

(-)stand/lua/menu.lua (-11 / +16 lines)
Lines 401-409 function menu.process(menudef, keypress) Link Here
401
end
401
end
402
402
403
function menu.run()
403
function menu.run()
404
	local delay = loader.getenv("autoboot_delay")
405
406
	if delay ~= nil and delay:lower() == "no" then
407
		delay = nil
408
	end
409
	delay = tonumber(delay) or 10
410
411
	if delay == -1 then
412
		core.boot()
413
		return
414
	end
415
404
	menu.draw(menu.default)
416
	menu.draw(menu.default)
405
	local autoboot_key = menu.autoboot()
406
417
418
	local autoboot_key = menu.autoboot(delay)
419
407
	menu.process(menu.default, autoboot_key)
420
	menu.process(menu.default, autoboot_key)
408
	drawn_menu = nil
421
	drawn_menu = nil
409
422
Lines 411-429 function menu.run() Link Here
411
	print("Exiting menu!")
424
	print("Exiting menu!")
412
end
425
end
413
426
414
function menu.autoboot()
427
function menu.autoboot(delay)
415
	local ab = loader.getenv("autoboot_delay")
416
	if ab ~= nil and ab:lower() == "no" then
417
		return nil
418
	elseif tonumber(ab) == -1 then
419
		core.boot()
420
	end
421
	ab = tonumber(ab) or 10
422
423
	local x = loader.getenv("loader_menu_timeout_x") or 4
428
	local x = loader.getenv("loader_menu_timeout_x") or 4
424
	local y = loader.getenv("loader_menu_timeout_y") or 23
429
	local y = loader.getenv("loader_menu_timeout_y") or 23
425
430
426
	local endtime = loader.time() + ab
431
	local endtime = loader.time() + delay
427
	local time
432
	local time
428
	local last
433
	local last
429
	repeat
434
	repeat

Return to bug 231610