From 2f908ec72358576cd0802a987be69ab275b56778 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Fri, 9 Aug 2013 09:24:40 +0000 Subject: [PATCH] [NTVDM] Calculate the text height instead of using a hardcoded value. svn path=/branches/ntvdm/; revision=59674 --- subsystems/ntvdm/vga.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subsystems/ntvdm/vga.c b/subsystems/ntvdm/vga.c index e13cf71e315..a535048a680 100644 --- a/subsystems/ntvdm/vga.c +++ b/subsystems/ntvdm/vga.c @@ -569,6 +569,7 @@ DWORD VgaGetVideoLimitAddress(VOID) COORD VgaGetDisplayResolution(VOID) { COORD Resolution; + BYTE TextSize = 1 + (VgaCrtcRegisters[VGA_CRTC_MAX_SCAN_LINE_REG] & 0x1F); /* The low 8 bits are in the display registers */ Resolution.X = VgaCrtcRegisters[VGA_CRTC_END_HORZ_DISP_REG]; @@ -603,7 +604,7 @@ COORD VgaGetDisplayResolution(VOID) else { /* Divide the number of scanlines by the font size */ - Resolution.Y /= 16; + Resolution.Y /= TextSize; } /* Return the resolution */