Skip to content

Commit

Permalink
Prevented fanfares from playing in headless mode (#6219)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkmnsnfrn authored Feb 9, 2025
1 parent 43bce41 commit a8c9857
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "constants/cries.h"
#include "constants/songs.h"
#include "task.h"
#include "test_runner.h"

struct Fanfare
{
Expand Down Expand Up @@ -237,6 +238,13 @@ bool8 IsFanfareTaskInactive(void)

static void Task_Fanfare(u8 taskId)
{
if (gTestRunnerHeadless)
{
DestroyTask(taskId);
sFanfareCounter = 0;
return;
}

if (sFanfareCounter)
{
sFanfareCounter--;
Expand Down

0 comments on commit a8c9857

Please sign in to comment.