play startup sound also when reboot

This commit is contained in:
kanjitalk755 2022-06-04 16:32:57 +09:00
parent 41648c23c5
commit 11e88dd94f
3 changed files with 8 additions and 3 deletions

View File

@ -55,7 +55,6 @@ static bool audio_mute = false;
// Prototypes
static void stream_func(void *arg, uint8 *stream, int stream_len);
static int play_startup(void *arg);
/*
@ -168,8 +167,6 @@ void AudioInit(void)
// Open and initialize audio device
open_audio();
SDL_CreateThread(play_startup, "", NULL);
}
@ -383,3 +380,7 @@ static int play_startup(void *arg) {
}
return 0;
}
void PlayStartupSound() {
SDL_CreateThread(play_startup, "", NULL);
}

View File

@ -49,6 +49,7 @@
#define DEBUG 0
#include "debug.h"
void PlayStartupSound();
/*
* Execute EMUL_OP opcode (called by 68k emulator or Illegal Instruction trap handler)
@ -92,6 +93,7 @@ void EmulOp(uint16 opcode, M68kRegisters *r)
TimerReset();
EtherReset();
AudioReset();
PlayStartupSound();
// Create BootGlobs at top of memory
Mac_memset(RAMBaseMac + RAMSize - 4096, 0, 4096);

View File

@ -50,6 +50,7 @@
#define DEBUG 0
#include "debug.h"
void PlayStartupSound();
// TVector of MakeExecutable
static uint32 MakeExecutableTvec;
@ -285,6 +286,7 @@ void EmulOp(M68kRegisters *r, uint32 pc, int selector)
TimerReset();
MacOSUtilReset();
AudioReset();
PlayStartupSound();
// Enable DR emulator (disabled for now)
if (PrefsFindBool("jit68k") && 0) {