Module Name: src
Committed By: nonaka
Date: Fri Mar 24 01:25:36 UTC 2017
Modified Files:
src/sys/arch/i386/stand/efiboot: eficons.c
Log Message:
Don't maximize the text columns and rows. only use 100x31 or 80x25.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/stand/efiboot/eficons.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/i386/stand/efiboot/eficons.c
diff -u src/sys/arch/i386/stand/efiboot/eficons.c:1.2 src/sys/arch/i386/stand/efiboot/eficons.c:1.3
--- src/sys/arch/i386/stand/efiboot/eficons.c:1.2 Fri Mar 24 01:00:47 2017
+++ src/sys/arch/i386/stand/efiboot/eficons.c Fri Mar 24 01:25:36 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: eficons.c,v 1.2 2017/03/24 01:00:47 nonaka Exp $ */
+/* $NetBSD: eficons.c,v 1.3 2017/03/24 01:25:36 nonaka Exp $ */
/*-
* Copyright (c) 2016 Kimihiro Nonaka <[email protected]>
@@ -499,24 +499,27 @@ static void
eficons_init_video(void)
{
EFI_STATUS status;
- UINTN cols, rows, dim = 0;
- INT32 i, best = -1;
+ UINTN cols, rows;
+ INT32 i, best, mode80x25, mode100x31;
/*
* Setup text mode
*/
uefi_call_wrapper(ST->ConOut->Reset, 2, ST->ConOut, TRUE);
+ mode80x25 = mode100x31 = -1;
for (i = 0; i < ST->ConOut->Mode->MaxMode; i++) {
status = uefi_call_wrapper(ST->ConOut->QueryMode, 4,
ST->ConOut, i, &cols, &rows);
if (EFI_ERROR(status))
continue;
- if (dim < cols * rows) {
- dim = cols * rows;
- best = i;
- }
+
+ if (mode80x25 < 0 && cols == 80 && rows == 25)
+ mode80x25 = i;
+ else if (mode100x31 < 0 && cols == 100 && rows == 31)
+ mode100x31 = i;
}
+ best = mode100x31 >= 0 ? mode100x31 : mode80x25 >= 0 ? mode80x25 : -1;
if (best >= 0)
uefi_call_wrapper(ST->ConOut->SetMode, 2, ST->ConOut, best);
uefi_call_wrapper(ST->ConOut->EnableCursor, 2, ST->ConOut, TRUE);