Author: aandrejevic Date: Fri Aug 9 09:24:40 2013 New Revision: 59674
URL: http://svn.reactos.org/svn/reactos?rev=59674&view=rev Log: [NTVDM] Calculate the text height instead of using a hardcoded value.
Modified: branches/ntvdm/subsystems/ntvdm/vga.c
Modified: branches/ntvdm/subsystems/ntvdm/vga.c URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/vga.c?rev... ============================================================================== --- branches/ntvdm/subsystems/ntvdm/vga.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/vga.c [iso-8859-1] Fri Aug 9 09:24:40 2013 @@ -569,6 +569,7 @@ 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 @@ else { /* Divide the number of scanlines by the font size */ - Resolution.Y /= 16; + Resolution.Y /= TextSize; }
/* Return the resolution */