Author: hbelusca
Date: Sun Mar 2 15:04:56 2014
New Revision: 62379
URL:
http://svn.reactos.org/svn/reactos?rev=62379&view=rev
Log:
[NTVDM]
Definitively fix console resizing when exiting the VDM.
Modified:
branches/ntvdm/subsystems/ntvdm/hardware/vga.c
branches/ntvdm/subsystems/ntvdm/ntvdm.c
Modified: branches/ntvdm/subsystems/ntvdm/hardware/vga.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/hardware…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/hardware/vga.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/hardware/vga.c [iso-8859-1] Sun Mar 2 15:04:56 2014
@@ -952,8 +952,8 @@
SetConsoleActiveScreenBuffer(TextConsoleBuffer);
/* Resize the console */
- ConRect.Left = 0; // ConsoleInfo.srWindow.Left;
- ConRect.Top = ConsoleInfo.srWindow.Top; // ConsoleSize->Y - Resolution->Y;
+ ConRect.Left = 0;
+ ConRect.Top = ConsoleInfo.srWindow.Top;
ConRect.Right = ConRect.Left + Resolution->X - 1;
ConRect.Bottom = ConRect.Top + Resolution->Y - 1;
/*
Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.c?…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] Sun Mar 2 15:04:56 2014
@@ -337,23 +337,20 @@
VOID ConsoleCleanup(VOID)
{
SMALL_RECT ConRect;
- CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo;
/* Restore the old screen buffer */
SetConsoleActiveScreenBuffer(ConsoleOutput);
/* Restore the original console size */
- GetConsoleScreenBufferInfo(ConsoleOutput, &ConsoleInfo);
- ConRect.Left = 0; // OrgConsoleBufferInfo.srWindow.Left;
- // ConRect.Top = ConsoleInfo.dwCursorPosition.Y /
(OrgConsoleBufferInfo.srWindow.Bottom - OrgConsoleBufferInfo.srWindow.Top + 1);
- // ConRect.Top *= (OrgConsoleBufferInfo.srWindow.Bottom -
OrgConsoleBufferInfo.srWindow.Top + 1);
- ConRect.Top = ConsoleInfo.dwCursorPosition.Y;
+ ConRect.Left = 0;
+ ConRect.Top = 0;
ConRect.Right = ConRect.Left + OrgConsoleBufferInfo.srWindow.Right -
OrgConsoleBufferInfo.srWindow.Left;
ConRect.Bottom = ConRect.Top + OrgConsoleBufferInfo.srWindow.Bottom -
OrgConsoleBufferInfo.srWindow.Top ;
- /* See the following trick explanation in vga.c:VgaEnterTextMode() */
+ /*
+ * See the following trick explanation in vga.c:VgaEnterTextMode() .
+ */
SetConsoleScreenBufferSize(ConsoleOutput, OrgConsoleBufferInfo.dwSize);
SetConsoleWindowInfo(ConsoleOutput, TRUE, &ConRect);
- // SetConsoleWindowInfo(ConsoleOutput, TRUE, &OrgConsoleBufferInfo.srWindow);
SetConsoleScreenBufferSize(ConsoleOutput, OrgConsoleBufferInfo.dwSize);
/* Restore the original cursor shape */