Author: hbelusca
Date: Tue Aug 13 20:15:24 2013
New Revision: 59730
URL:
http://svn.reactos.org/svn/reactos?rev=59730&view=rev
Log:
[NTVDM]
Simplify the code
Modified:
branches/ntvdm/subsystems/ntvdm/bios.c
Modified: branches/ntvdm/subsystems/ntvdm/bios.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios.c?r…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/bios.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/bios.c [iso-8859-1] Tue Aug 13 20:15:24 2013
@@ -429,7 +429,11 @@
BOOLEAN BiosSetVideoPage(BYTE PageNumber)
{
+ /* Check if the page exists */
if (PageNumber >= BIOS_MAX_PAGES) return FALSE;
+
+ /* Check if this is the same page */
+ if (PageNumber == Bda->VideoPage) return TRUE;
/* Set the values in the BDA */
Bda->VideoPage = PageNumber;
@@ -744,7 +748,6 @@
{
BiosSetVideoMode(LOBYTE(Eax));
VgaClearMemory();
-
break;
}
@@ -800,15 +803,7 @@
/* Select Active Display Page */
case 0x05:
{
- /* Check if the page exists */
- if (LOBYTE(Eax) >= BIOS_MAX_PAGES) break;
-
- /* Check if this is the same page */
- if (LOBYTE(Eax) == Bda->VideoPage) break;
-
- /* Change the video page */
BiosSetVideoPage(LOBYTE(Eax));
-
break;
}