Torge Matthies : powrprof: Add PowerSettingRegisterNotification stub.

Alexandre Julliard julliard at winehq.org
Tue Mar 1 15:45:34 CST 2022


Module: wine
Branch: master
Commit: 7180a9b926214acc8ff984b4b8fc04287d238d2c
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7180a9b926214acc8ff984b4b8fc04287d238d2c

Author: Torge Matthies <openglfreak at googlemail.com>
Date:   Sun Feb 27 02:02:34 2022 +0100

powrprof: Add PowerSettingRegisterNotification stub.

Needed by old Special K versions according to
https://github.com/ValveSoftware/Proton/issues/5625.

Signed-off-by: Torge Matthies <openglfreak at googlemail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/powrprof/powrprof.c    | 7 +++++++
 dlls/powrprof/powrprof.spec | 1 +
 include/powrprof.h          | 1 +
 3 files changed, 9 insertions(+)

diff --git a/dlls/powrprof/powrprof.c b/dlls/powrprof/powrprof.c
index dc6e8bdaa15..3a5b93fed3c 100644
--- a/dlls/powrprof/powrprof.c
+++ b/dlls/powrprof/powrprof.c
@@ -343,6 +343,13 @@ DWORD WINAPI PowerUnregisterSuspendResumeNotification(HPOWERNOTIFY handle)
     return ERROR_SUCCESS;
 }
 
+DWORD WINAPI PowerSettingRegisterNotification(const GUID *setting, DWORD flags, HANDLE recipient, PHPOWERNOTIFY handle)
+{
+    FIXME("(%s,0x%08lx,%p,%p) stub!\n", debugstr_guid(setting), flags, recipient, handle);
+    *handle = (PHPOWERNOTIFY)0xdeadbeef;
+    return ERROR_SUCCESS;
+}
+
 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 {
    switch(fdwReason) {
diff --git a/dlls/powrprof/powrprof.spec b/dlls/powrprof/powrprof.spec
index cbd2e47c1f2..3524be251a6 100644
--- a/dlls/powrprof/powrprof.spec
+++ b/dlls/powrprof/powrprof.spec
@@ -19,6 +19,7 @@
 @ stdcall PowerReadFriendlyName (ptr ptr ptr ptr ptr ptr)
 @ stdcall PowerRegisterSuspendResumeNotification(long ptr ptr)
 @ stdcall PowerUnregisterSuspendResumeNotification(ptr)
+@ stdcall PowerSettingRegisterNotification(ptr long ptr ptr)
 @ stdcall ReadGlobalPwrPolicy (ptr)
 @ stdcall ReadProcessorPwrScheme (long ptr)
 @ stdcall ReadPwrScheme (long ptr)
diff --git a/include/powrprof.h b/include/powrprof.h
index 6959a9aeb13..51fa158f239 100644
--- a/include/powrprof.h
+++ b/include/powrprof.h
@@ -162,6 +162,7 @@ BOOLEAN WINAPI IsPwrSuspendAllowed(VOID);
 DWORD   WINAPI PowerEnumerate(HKEY, const GUID *, const GUID *, POWER_DATA_ACCESSOR, ULONG, UCHAR *, DWORD *);
 DWORD   WINAPI PowerRegisterSuspendResumeNotification(DWORD, HANDLE, PHPOWERNOTIFY);
 DWORD   WINAPI PowerUnregisterSuspendResumeNotification(HPOWERNOTIFY);
+DWORD   WINAPI PowerSettingRegisterNotification(const GUID *, DWORD, HANDLE, PHPOWERNOTIFY);
 BOOLEAN WINAPI ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
 BOOLEAN WINAPI ReadProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY);
 BOOLEAN WINAPI ReadPwrScheme(UINT, PPOWER_POLICY);




More information about the wine-cvs mailing list