Audio: Properly close audio device on emulator destruction

This commit is contained in:
wheremyfoodat 2024-11-19 23:40:15 +02:00 committed by GitHub
parent 452510b932
commit 37ee5c5477
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 7 deletions

View file

@ -50,6 +50,7 @@ Emulator::Emulator()
Emulator::~Emulator() {
config.save();
lua.close();
audioDevice.close();
#ifdef PANDA3DS_ENABLE_DISCORD_RPC
discordRpc.stop();
@ -249,7 +250,7 @@ bool Emulator::loadROM(const std::filesystem::path& path) {
success = loadELF(path);
else if (extension == ".3ds" || extension == ".cci")
success = loadNCSD(path, ROMType::NCSD);
else if (extension == ".cxi" || extension == ".app" || extension == ".ncch")
else if (extension == ".cxi" || extension == ".app")
success = loadNCSD(path, ROMType::CXI);
else if (extension == ".3dsx")
success = load3DSX(path);