mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[WINLOGON] Implement startup sound support (HACK)
CORE-13951
This commit is contained in:
parent
37375fcc4d
commit
2557948179
1 changed files with 19 additions and 1 deletions
|
@ -285,6 +285,22 @@ PlaySoundRoutine(
|
|||
return Ret;
|
||||
}
|
||||
|
||||
static
|
||||
BOOL
|
||||
IsFirstLogon(VOID)
|
||||
{
|
||||
/* FIXME: All of this is a HACK, designed specifically for PlayLogonSoundThread.
|
||||
* Don't call IsFirstLogon multiple times inside the same function. And please
|
||||
* note that this function is not thread-safe. */
|
||||
static BOOL bFirstLogon = TRUE;
|
||||
if (bFirstLogon)
|
||||
{
|
||||
bFirstLogon = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DWORD
|
||||
WINAPI
|
||||
PlayLogonSoundThread(
|
||||
|
@ -347,7 +363,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;
|
||||
|
|
Loading…
Reference in a new issue