https://git.reactos.org/?p=reactos.git;a=commitdiff;h=37375fcc4dbe1d7629463…
commit 37375fcc4dbe1d7629463d528aa09dad75b4c937
Author: Thamatip Chitpong <thamatip.chitpong(a)reactos.org>
AuthorDate: Wed Dec 4 00:19:26 2024 +0700
Commit: Thamatip Chitpong <thamatip.chitpong(a)reactos.org>
CommitDate: Mon Dec 9 09:52:57 2024 +0700
[WINLOGON] Implement shutdown sound support
CORE-13951
---
base/system/winlogon/sas.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/base/system/winlogon/sas.c b/base/system/winlogon/sas.c
index 0bb363fd87f..f00bbf50b18 100644
--- a/base/system/winlogon/sas.c
+++ b/base/system/winlogon/sas.c
@@ -367,13 +367,17 @@ PlayLogonSound(
static
VOID
-PlayLogoffSound(
- _In_ PWLSESSION Session)
+PlayLogoffShutdownSound(
+ _In_ PWLSESSION Session,
+ _In_ BOOL bShutdown)
{
if (!ImpersonateLoggedOnUser(Session->UserToken))
return;
- PlaySoundRoutine(L"WindowsLogoff", FALSE, SND_ALIAS | SND_NODEFAULT);
+ /* NOTE: Logoff and shutdown sounds play synchronously */
+ PlaySoundRoutine(bShutdown ? L"SystemExit" : L"WindowsLogoff",
+ FALSE,
+ SND_ALIAS | SND_NODEFAULT);
RevertToSelf();
}
@@ -848,7 +852,7 @@ HandleLogoff(
SwitchDesktop(Session->WinlogonDesktop);
- PlayLogoffSound(Session);
+ PlayLogoffShutdownSound(Session, WLX_SHUTTINGDOWN(wlxAction));
SetWindowStationUser(Session->InteractiveWindowStation,
&LuidNone, NULL, 0);