https://git.reactos.org/?p=reactos.git;a=commitdiff;h=79f16507c4835560bf6b2…
commit 79f16507c4835560bf6b2285922a9781bd262a9a
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sat Oct 22 13:33:55 2022 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Tue Nov 15 23:15:26 2022 +0100
[VGAMP/VGADDI] Be consistent in IOCTL_VIDEO_GET_CURRENT_MODE and
IOCTL_VIDEO_SET_CURRENT_MODE
As IOCTL_VIDEO_GET_CURRENT_MODE returns 2 as ModeIndex, wait for the same value
in IOCTL_VIDEO_SET_CURRENT_MODE.
Also change vgaddi to send this hardcoded value.
vga_new also uses 2 as index for 640x480x16
---
win32ss/drivers/displays/vga/objects/screen.c | 2 +-
win32ss/drivers/miniport/vga/vgamp.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/win32ss/drivers/displays/vga/objects/screen.c
b/win32ss/drivers/displays/vga/objects/screen.c
index 8c11ef0cebe..8cd4de9e576 100644
--- a/win32ss/drivers/displays/vga/objects/screen.c
+++ b/win32ss/drivers/displays/vga/objects/screen.c
@@ -139,7 +139,7 @@ BOOL InitVGA(PPDEV ppdev, BOOL bFirst)
ppdev->sizeSurf.cx = 640;
ppdev->sizeSurf.cy = 480;
- ppdev->ModeNum = 12;
+ ppdev->ModeNum = 2;
/* Set the mode that was requested */
if (EngDeviceIoControl(ppdev->KMDriver,
diff --git a/win32ss/drivers/miniport/vga/vgamp.c b/win32ss/drivers/miniport/vga/vgamp.c
index 4b892cc281e..a477b643342 100644
--- a/win32ss/drivers/miniport/vga/vgamp.c
+++ b/win32ss/drivers/miniport/vga/vgamp.c
@@ -545,7 +545,7 @@ BOOLEAN VGASetColorRegisters(IN PVIDEO_CLUT ColorLookUpTable,
BOOLEAN VGASetCurrentMode(IN PVIDEO_MODE RequestedMode,
OUT PSTATUS_BLOCK StatusBlock)
{
- if(RequestedMode->RequestedMode == 12)
+ if(RequestedMode->RequestedMode == 2)
{
InitVGAMode();
return TRUE;