Fix a crash when using DSi mode in debug builds on macOS (#1976)

Store the BIOS images in `NDSArgs`/`DSiArgs` through pointers, not directly

- This will make it easier to keep such objects on the stack
This commit is contained in:
Jesse Talavera
2024-03-13 09:55:20 -04:00
committed by GitHub
parent ea1755bed0
commit 31a7f53282
6 changed files with 45 additions and 39 deletions

View File

@ -80,8 +80,8 @@ NDS::NDS() noexcept :
NDSArgs {
nullptr,
nullptr,
bios_arm9_bin,
bios_arm7_bin,
std::make_unique<ARM9BIOSImage>(bios_arm9_bin),
std::make_unique<ARM7BIOSImage>(bios_arm7_bin),
Firmware(0),
}
)
@ -90,8 +90,8 @@ NDS::NDS() noexcept :
NDS::NDS(NDSArgs&& args, int type) noexcept :
ConsoleType(type),
ARM7BIOS(args.ARM7BIOS),
ARM9BIOS(args.ARM9BIOS),
ARM7BIOS(*args.ARM7BIOS),
ARM9BIOS(*args.ARM9BIOS),
ARM7BIOSNative(CRC32(ARM7BIOS.data(), ARM7BIOS.size()) == ARM7BIOSCRC32),
ARM9BIOSNative(CRC32(ARM9BIOS.data(), ARM9BIOS.size()) == ARM9BIOSCRC32),
JIT(*this, args.JIT),