From 7150471cf1fe8be955206a6b5779b91bc1584414 Mon Sep 17 00:00:00 2001 From: Justin Miller Date: Sun, 10 Nov 2024 01:31:08 -0800 Subject: [PATCH] Intel HD GPU Hacks --- ntoskrnl/mm/ARM3/syspte.c | 4 ++++ win32ss/drivers/videoprt/resource.c | 2 +- win32ss/drivers/videoprt/videoprt.c | 1 + win32ss/user/ntuser/display.c | 3 --- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ntoskrnl/mm/ARM3/syspte.c b/ntoskrnl/mm/ARM3/syspte.c index 87b862c265f2d..97d3a23bf99c1 100644 --- a/ntoskrnl/mm/ARM3/syspte.c +++ b/ntoskrnl/mm/ARM3/syspte.c @@ -248,6 +248,10 @@ MiReserveSystemPtes(IN ULONG NumberOfPtes, { PMMPTE PointerPte; + if (NumberOfPtes > 32768) + { + return NULL; + } // // Use the extended function // diff --git a/win32ss/drivers/videoprt/resource.c b/win32ss/drivers/videoprt/resource.c index 9f50c4bd5e78b..3a09eec5ebddf 100644 --- a/win32ss/drivers/videoprt/resource.c +++ b/win32ss/drivers/videoprt/resource.c @@ -1015,7 +1015,7 @@ VideoPortVerifyAccessRanges( } if (!NT_SUCCESS(Status) || ConflictDetected) - return ERROR_INVALID_PARAMETER; + return NO_ERROR; else return NO_ERROR; } diff --git a/win32ss/drivers/videoprt/videoprt.c b/win32ss/drivers/videoprt/videoprt.c index 97c5290b76fcb..61e9890314a6c 100644 --- a/win32ss/drivers/videoprt/videoprt.c +++ b/win32ss/drivers/videoprt/videoprt.c @@ -1469,6 +1469,7 @@ VideoPortCreateSecondaryDisplay( IN OUT PVOID *SecondaryDeviceExtension, IN ULONG Flag) { + return ERROR_DEV_NOT_EXIST; PDEVICE_OBJECT DeviceObject; PVIDEO_PORT_DEVICE_EXTENSION FirstDeviceExtension, DeviceExtension; NTSTATUS Status; diff --git a/win32ss/user/ntuser/display.c b/win32ss/user/ntuser/display.c index 5a9a5911262e0..bcc53b09b463e 100644 --- a/win32ss/user/ntuser/display.c +++ b/win32ss/user/ntuser/display.c @@ -489,9 +489,6 @@ UserEnumDisplaySettings( /* let's politely ask the driver for an updated mode list, just in case there's something new in there (vbox) */ - PDEVOBJ_vRefreshModeList(ppdev); - PDEVOBJ_vRelease(ppdev); - iFoundMode = 0; for (i = 0; i < pGraphicsDevice->cDevModes; i++) {