mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 15:36:04 +00:00
[NTVDM]
Fix more MSVC warnings. svn path=/branches/ntvdm/; revision=59667
This commit is contained in:
parent
5e69cb4dcb
commit
bcdc670ae9
2 changed files with 8 additions and 8 deletions
|
@ -964,7 +964,7 @@ BOOLEAN DosCreateProcess(LPCSTR CommandLine, WORD EnvBlock)
|
||||||
for (i = Header->e_maxalloc; i >= Header->e_minalloc; i--, ExeSize--)
|
for (i = Header->e_maxalloc; i >= Header->e_minalloc; i--, ExeSize--)
|
||||||
{
|
{
|
||||||
/* Try to allocate that much memory */
|
/* Try to allocate that much memory */
|
||||||
Segment = DosAllocateMemory(ExeSize, NULL);
|
Segment = DosAllocateMemory((WORD)ExeSize, NULL);
|
||||||
if (Segment != 0) break;
|
if (Segment != 0) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -974,7 +974,7 @@ BOOLEAN DosCreateProcess(LPCSTR CommandLine, WORD EnvBlock)
|
||||||
/* Initialize the PSP */
|
/* Initialize the PSP */
|
||||||
DosInitializePsp(Segment,
|
DosInitializePsp(Segment,
|
||||||
CommandLine,
|
CommandLine,
|
||||||
ExeSize,
|
(WORD)ExeSize,
|
||||||
EnvBlock);
|
EnvBlock);
|
||||||
|
|
||||||
/* The process owns its own memory */
|
/* The process owns its own memory */
|
||||||
|
@ -1046,7 +1046,7 @@ BOOLEAN DosCreateProcess(LPCSTR CommandLine, WORD EnvBlock)
|
||||||
/* Initialize the PSP */
|
/* Initialize the PSP */
|
||||||
DosInitializePsp(Segment,
|
DosInitializePsp(Segment,
|
||||||
CommandLine,
|
CommandLine,
|
||||||
(FileSize + sizeof(DOS_PSP)) >> 4,
|
(WORD)((FileSize + sizeof(DOS_PSP)) >> 4),
|
||||||
EnvBlock);
|
EnvBlock);
|
||||||
|
|
||||||
/* Set the initial segment registers */
|
/* Set the initial segment registers */
|
||||||
|
@ -1227,8 +1227,8 @@ VOID DosInt21h(LPWORD Stack)
|
||||||
DWORD Ecx = EmulatorGetRegister(EMULATOR_REG_CX);
|
DWORD Ecx = EmulatorGetRegister(EMULATOR_REG_CX);
|
||||||
DWORD Edx = EmulatorGetRegister(EMULATOR_REG_DX);
|
DWORD Edx = EmulatorGetRegister(EMULATOR_REG_DX);
|
||||||
DWORD Ebx = EmulatorGetRegister(EMULATOR_REG_BX);
|
DWORD Ebx = EmulatorGetRegister(EMULATOR_REG_BX);
|
||||||
WORD DataSegment = EmulatorGetRegister(EMULATOR_REG_DS);
|
WORD DataSegment = (WORD)EmulatorGetRegister(EMULATOR_REG_DS);
|
||||||
WORD ExtSegment = EmulatorGetRegister(EMULATOR_REG_ES);
|
WORD ExtSegment = (WORD)EmulatorGetRegister(EMULATOR_REG_ES);
|
||||||
|
|
||||||
/* Check the value in the AH register */
|
/* Check the value in the AH register */
|
||||||
switch (HIBYTE(Eax))
|
switch (HIBYTE(Eax))
|
||||||
|
|
|
@ -235,7 +235,7 @@ static VOID VgaEnterGraphicsMode(UINT Width, UINT Height, UINT BitDepth)
|
||||||
BitmapInfo->bmiHeader.biSizeImage = Width * Height * (BitDepth / 8);
|
BitmapInfo->bmiHeader.biSizeImage = Width * Height * (BitDepth / 8);
|
||||||
|
|
||||||
/* Fill the palette data */
|
/* Fill the palette data */
|
||||||
for (i = 0; i < BitDepth; i++) PaletteIndex[i] = i;
|
for (i = 0; i < BitDepth; i++) PaletteIndex[i] = (WORD)i;
|
||||||
|
|
||||||
/* Fill the console graphics buffer info */
|
/* Fill the console graphics buffer info */
|
||||||
GraphicsBufferInfo.dwBitMapInfoLength = VGA_BITMAP_INFO_SIZE;
|
GraphicsBufferInfo.dwBitMapInfoLength = VGA_BITMAP_INFO_SIZE;
|
||||||
|
@ -503,8 +503,8 @@ static VOID VgaUpdateTextCursor(VOID)
|
||||||
Location += (VgaCrtcRegisters[VGA_CRTC_CURSOR_END_REG] >> 5) & 3;
|
Location += (VgaCrtcRegisters[VGA_CRTC_CURSOR_END_REG] >> 5) & 3;
|
||||||
|
|
||||||
/* Find the coordinates of the new position */
|
/* Find the coordinates of the new position */
|
||||||
Position.X = Location % ScanlineSize;
|
Position.X = (WORD)(Location % ScanlineSize);
|
||||||
Position.Y = Location / ScanlineSize;
|
Position.Y = (WORD)(Location / ScanlineSize);
|
||||||
|
|
||||||
/* Update the physical cursor */
|
/* Update the physical cursor */
|
||||||
SetConsoleCursorInfo(TextConsoleBuffer, &CursorInfo);
|
SetConsoleCursorInfo(TextConsoleBuffer, &CursorInfo);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue