projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[NTVDM]
[reactos.git]
/
reactos
/
subsystems
/
ntvdm
/
hardware
/
vga.c
diff --git
a/reactos/subsystems/ntvdm/hardware/vga.c
b/reactos/subsystems/ntvdm/hardware/vga.c
index
caa6332
..
af9c0e0
100644
(file)
--- a/
reactos/subsystems/ntvdm/hardware/vga.c
+++ b/
reactos/subsystems/ntvdm/hardware/vga.c
@@
-942,6
+942,16
@@
Cleanup:
return Result;
}
return Result;
}
+static VOID VgaSetActiveScreenBuffer(HANDLE ScreenBuffer)
+{
+ /* Set the active buffer */
+ SetConsoleActiveScreenBuffer(ScreenBuffer);
+
+ /* Reinitialize the VDM menu */
+ DestroyVdmMenu();
+ CreateVdmMenu(ScreenBuffer);
+}
+
static BOOL VgaEnterGraphicsMode(PCOORD Resolution)
{
DWORD i;
static BOOL VgaEnterGraphicsMode(PCOORD Resolution)
{
DWORD i;
@@
-999,7
+1009,7
@@
static BOOL VgaEnterGraphicsMode(PCOORD Resolution)
ZeroMemory(ConsoleFramebuffer, BitmapInfo->bmiHeader.biSizeImage);
/* Set the active buffer */
ZeroMemory(ConsoleFramebuffer, BitmapInfo->bmiHeader.biSizeImage);
/* Set the active buffer */
-
SetConsole
ActiveScreenBuffer(GraphicsConsoleBuffer);
+
VgaSet
ActiveScreenBuffer(GraphicsConsoleBuffer);
/* Set the graphics mode palette */
SetConsolePalette(GraphicsConsoleBuffer,
/* Set the graphics mode palette */
SetConsolePalette(GraphicsConsoleBuffer,
@@
-1018,7
+1028,7
@@
static VOID VgaLeaveGraphicsMode(VOID)
ReleaseMutex(ConsoleMutex);
/* Switch back to the default console text buffer */
ReleaseMutex(ConsoleMutex);
/* Switch back to the default console text buffer */
- //
SetConsole
ActiveScreenBuffer(TextConsoleBuffer);
+ //
VgaSet
ActiveScreenBuffer(TextConsoleBuffer);
/* Cleanup the video data */
CloseHandle(ConsoleMutex);
/* Cleanup the video data */
CloseHandle(ConsoleMutex);
@@
-1034,7
+1044,7
@@
static BOOL VgaEnterTextMode(PCOORD Resolution)
DPRINT1("VgaEnterTextMode\n");
/* Switch to the text buffer */
DPRINT1("VgaEnterTextMode\n");
/* Switch to the text buffer */
-
SetConsole
ActiveScreenBuffer(TextConsoleBuffer);
+
VgaSet
ActiveScreenBuffer(TextConsoleBuffer);
/* Adjust the text framebuffer if we changed the resolution */
if (TextResolution.X != Resolution->X ||
/* Adjust the text framebuffer if we changed the resolution */
if (TextResolution.X != Resolution->X ||
@@
-1950,7
+1960,7
@@
VOID VgaDetachFromConsole(BOOL ChangingMode)
SMALL_RECT ConRect;
/* Restore the old screen buffer */
SMALL_RECT ConRect;
/* Restore the old screen buffer */
-
SetConsole
ActiveScreenBuffer(TextConsoleBuffer);
+
VgaSet
ActiveScreenBuffer(TextConsoleBuffer);
/* Restore the original console size */
ConRect.Left = 0;
/* Restore the original console size */
ConRect.Left = 0;
@@
-1988,7
+1998,7
@@
BOOLEAN VgaInitialize(HANDLE TextHandle)
/***/ VgaResetPalette(); /***/
/* Switch to the text buffer */
/***/ VgaResetPalette(); /***/
/* Switch to the text buffer */
-
SetConsole
ActiveScreenBuffer(TextConsoleBuffer);
+
VgaSet
ActiveScreenBuffer(TextConsoleBuffer);
/* Clear the VGA memory */
VgaClearMemory();
/* Clear the VGA memory */
VgaClearMemory();