Skip to content

Commit c2baac6

Browse files
committed
menu: Shorten countdown text and restore 40-column minimum
1 parent a9d24f0 commit c2baac6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

common/menu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ noreturn void _menu(bool first_run) {
13311331

13321332
menu_init_term();
13331333

1334-
if (terms[0]->cols < 70 || terms[0]->rows < 16) {
1334+
if (terms[0]->cols < 40 || terms[0]->rows < 16) {
13351335
// Terminal too small for menu, fall back to text console
13361336
#if defined (BIOS)
13371337
vga_textmode_init(true);
@@ -1492,10 +1492,10 @@ noreturn void _menu(bool first_run) {
14921492
for (size_t i = timeout; i; i--) {
14931493
size_t ndigits = 1;
14941494
for (size_t tmp = i / 10; tmp > 0; tmp /= 10) ndigits++;
1495-
size_t msg_len = 65 + ndigits;
1496-
set_cursor_pos_helper(msg_len < terms[0]->cols ? (terms[0]->cols - msg_len) / 2 : 0, terms[0]->rows - 2);
1495+
size_t msg_len = 28 + ndigits;
1496+
set_cursor_pos_helper((terms[0]->cols - msg_len) / 2, terms[0]->rows - 2);
14971497
FOR_TERM(TERM->scroll_enabled = false);
1498-
print("\e[2K%sBooting automatically in %s%U%s, press any key to stop the countdown...\e[0m",
1498+
print("\e[2K%sBooting automatically in %s%U%s...\e[0m",
14991499
interface_help_colour, interface_help_colour_bright, (uint64_t)i, interface_help_colour);
15001500
FOR_TERM(TERM->scroll_enabled = true);
15011501
FOR_TERM(TERM->double_buffer_flush(TERM));

0 commit comments

Comments
 (0)