https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f3f4cc0f25e201c3ec220…
commit f3f4cc0f25e201c3ec220c6ce3d5a401717e8e78
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sun Mar 20 18:05:36 2022 +0100
Commit: hpoussin <32227662+hpoussin(a)users.noreply.github.com>
CommitDate: Fri Apr 15 23:09:16 2022 +0200
[WIN32SS] Implement EngQueryDeviceAttribute
---
win32ss/gdi/eng/pdevobj.c | 27 +++++++++++++++++++++++++++
win32ss/gdi/eng/stubs.c | 28 ----------------------------
2 files changed, 27 insertions(+), 28 deletions(-)
diff --git a/win32ss/gdi/eng/pdevobj.c b/win32ss/gdi/eng/pdevobj.c
index 689e8653f97..f39afd18530 100644
--- a/win32ss/gdi/eng/pdevobj.c
+++ b/win32ss/gdi/eng/pdevobj.c
@@ -989,6 +989,33 @@ PDEVOBJ_vGetDeviceCaps(
/** Exported functions ********************************************************/
+/*
+ * @implemented
+ */
+BOOL
+APIENTRY
+EngQueryDeviceAttribute(
+ _In_ HDEV hdev,
+ _In_ ENG_DEVICE_ATTRIBUTE devAttr,
+ _In_reads_bytes_(cjInSize) PVOID pvIn,
+ _In_ ULONG cjInSize,
+ _Out_writes_bytes_(cjOutSize) PVOID pvOut,
+ _In_ ULONG cjOutSize)
+{
+ PPDEVOBJ ppdev = (PPDEVOBJ)hdev;
+
+ if (devAttr != QDA_ACCELERATION_LEVEL)
+ return FALSE;
+
+ if (cjOutSize >= sizeof(DWORD))
+ {
+ *(DWORD*)pvOut = ppdev->dwAccelerationLevel;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
_Must_inspect_result_ _Ret_z_
LPWSTR
APIENTRY
diff --git a/win32ss/gdi/eng/stubs.c b/win32ss/gdi/eng/stubs.c
index 5cc878e0d80..e1b14af0448 100644
--- a/win32ss/gdi/eng/stubs.c
+++ b/win32ss/gdi/eng/stubs.c
@@ -577,34 +577,6 @@ EngPlgBlt(
return FALSE;
}
-/*
- * @unimplemented
- */
-BOOL
-APIENTRY
-EngQueryDeviceAttribute(
- _In_ HDEV hdev,
- _In_ ENG_DEVICE_ATTRIBUTE devAttr,
- _In_reads_bytes_(cjInSize) PVOID pvIn,
- _In_ ULONG cjInSize,
- _Out_writes_bytes_(cjOutSize) PVOID pvOut,
- _In_ ULONG cjOutSize)
-{
- if (devAttr != QDA_ACCELERATION_LEVEL)
- return FALSE;
-
- UNIMPLEMENTED;
-
- if (cjOutSize >= sizeof(DWORD))
- {
- /* Set all accelerations to enabled */
- *(DWORD*)pvOut = 0;
- return TRUE;
- }
-
- return FALSE;
-}
-
/*
* @unimplemented
*/