mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:36:11 +00:00
[NTVDM]
Calculate the text height instead of using a hardcoded value. svn path=/branches/ntvdm/; revision=59674
This commit is contained in:
parent
bd75425efd
commit
2f908ec723
1 changed files with 2 additions and 1 deletions
|
@ -569,6 +569,7 @@ DWORD VgaGetVideoLimitAddress(VOID)
|
||||||
COORD VgaGetDisplayResolution(VOID)
|
COORD VgaGetDisplayResolution(VOID)
|
||||||
{
|
{
|
||||||
COORD Resolution;
|
COORD Resolution;
|
||||||
|
BYTE TextSize = 1 + (VgaCrtcRegisters[VGA_CRTC_MAX_SCAN_LINE_REG] & 0x1F);
|
||||||
|
|
||||||
/* The low 8 bits are in the display registers */
|
/* The low 8 bits are in the display registers */
|
||||||
Resolution.X = VgaCrtcRegisters[VGA_CRTC_END_HORZ_DISP_REG];
|
Resolution.X = VgaCrtcRegisters[VGA_CRTC_END_HORZ_DISP_REG];
|
||||||
|
@ -603,7 +604,7 @@ COORD VgaGetDisplayResolution(VOID)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Divide the number of scanlines by the font size */
|
/* Divide the number of scanlines by the font size */
|
||||||
Resolution.Y /= 16;
|
Resolution.Y /= TextSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the resolution */
|
/* Return the resolution */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue