Author: hbelusca Date: Sat Nov 16 23:11:54 2013 New Revision: 61014
URL: http://svn.reactos.org/svn/reactos?rev=61014&view=rev Log: [NTVDM] - Use MAX/MINSHORT instead of CRT macros. - Include only the relevant headers.
Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.h branches/ntvdm/subsystems/ntvdm/vga.c
Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.h URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.h?r... ============================================================================== --- branches/ntvdm/subsystems/ntvdm/ntvdm.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/ntvdm.h [iso-8859-1] Sat Nov 16 23:11:54 2013 @@ -16,7 +16,12 @@ #include <conio.h>
#define WIN32_NO_STATUS -#include <windows.h> +#include <windef.h> +#include <winbase.h> +#include <wingdi.h> +#include <wincon.h> +#include <winnls.h> +#include <winuser.h>
#include <debug.h>
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] Sat Nov 16 23:11:54 2013 @@ -132,17 +132,17 @@ if (VgaCrtcRegisters[VGA_CRTC_UNDERLINE_REG] & VGA_CRTC_UNDERLINE_DWORD) { /* Double-word addressing */ - return 4; + return 4; // sizeof(DWORD) }
if (VgaCrtcRegisters[VGA_CRTC_MODE_CONTROL_REG] & VGA_CRTC_MODE_CONTROL_BYTE) { /* Byte addressing */ - return 1; + return 1; // sizeof(BYTE) }
/* Word addressing */ - return 2; + return 2; // sizeof(WORD) }
static inline DWORD VgaTranslateReadAddress(DWORD Address) @@ -265,8 +265,8 @@ /* Check if this is the first time the rectangle is updated */ if (!NeedsUpdate) { - UpdateRectangle.Left = UpdateRectangle.Top = SHRT_MAX; - UpdateRectangle.Right = UpdateRectangle.Bottom = SHRT_MIN; + UpdateRectangle.Left = UpdateRectangle.Top = MAXSHORT; + UpdateRectangle.Right = UpdateRectangle.Bottom = MINSHORT; }
/* Expand the rectangle to include the point */