Skip to content

Commit

Permalink
[WINLOGON] Implement startup sound support (HACK)
Browse files Browse the repository at this point in the history
CORE-13951
  • Loading branch information
TAN-Gaming committed Dec 3, 2024
1 parent 01953e8 commit 34a5312
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion base/system/winlogon/sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,20 @@ PlaySoundRoutine(
return Ret;
}

static
BOOL
IsFirstLogon(VOID)
{
/* FIXME: All of this is a hack */
static BOOL bFirstLogon = TRUE;
if (bFirstLogon)
{
bFirstLogon = FALSE;
return TRUE;
}
return FALSE;
}

DWORD
WINAPI
PlayLogonSoundThread(
Expand Down Expand Up @@ -347,7 +361,9 @@ PlayLogonSoundThread(
}
else
{
PlaySoundRoutine(L"WindowsLogon", TRUE, SND_ALIAS | SND_NODEFAULT);
PlaySoundRoutine(IsFirstLogon() ? L"SystemStart" : L"WindowsLogon",
TRUE,
SND_ALIAS | SND_NODEFAULT);
RevertToSelf();
}
return 0;
Expand Down

0 comments on commit 34a5312

Please sign in to comment.