File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,22 @@ PlaySoundRoutine(
285285 return Ret ;
286286}
287287
288+ static
289+ BOOL
290+ IsFirstLogon (VOID )
291+ {
292+ /* FIXME: All of this is a HACK, designed specifically for PlayLogonSoundThread.
293+ * Don't call IsFirstLogon multiple times inside the same function. And please
294+ * note that this function is not thread-safe. */
295+ static BOOL bFirstLogon = TRUE;
296+ if (bFirstLogon )
297+ {
298+ bFirstLogon = FALSE;
299+ return TRUE;
300+ }
301+ return FALSE;
302+ }
303+
288304DWORD
289305WINAPI
290306PlayLogonSoundThread (
@@ -347,7 +363,9 @@ PlayLogonSoundThread(
347363 }
348364 else
349365 {
350- PlaySoundRoutine (L"WindowsLogon" , TRUE, SND_ALIAS | SND_NODEFAULT );
366+ PlaySoundRoutine (IsFirstLogon () ? L"SystemStart" : L"WindowsLogon" ,
367+ TRUE,
368+ SND_ALIAS | SND_NODEFAULT );
351369 RevertToSelf ();
352370 }
353371 return 0 ;
You can’t perform that action at this time.
0 commit comments