loader: Fix 0 vs 1 confusion for column numbers

In two places we use '0' for a column number. However, the upper left
hand corner of the screen is 1, 1. Fix those two confusions. Also, fix
a comment that flipped the coordinates in a comment (I'm used to the
vt100 convention where it's row, column (eg y, x)) and didn't notice
the rest of the code uses x, y.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D46777
This commit is contained in:
Warner Losh 2024-09-24 13:54:56 -06:00
parent 1b3fa1ac36
commit 604919c47f
2 changed files with 3 additions and 3 deletions

View File

@ -556,9 +556,9 @@ function menu.autoboot(delay)
else
-- Erase autoboot msg. While real VT100s
-- wouldn't scroll when receiving a char with
-- the cursor at (24, 79), bad emulators do.
-- the cursor at (79, 24), bad emulators do.
-- Avoid the issue by stopping at 79.
screen.setcursor(0, y)
screen.setcursor(1, y)
printc(string.rep(" ", 79))
screen.defcursor()
return ch

View File

@ -32,7 +32,7 @@ local core = require("core")
local screen = {}
-- Module exports
screen.default_x = 0
screen.default_x = 1
screen.default_y = 25
function screen.clear()