merge doublemelon (#2067)

non-exhaustive (but exhausting) list of changes:

* base laid for multiple window support, but will likely require more work to work correctly
* encapsulation of frontend state for proper multi-instance support
* (JIT still needs a fix for the NDS::Current workaround but we can get there later)
* new, more flexible configuration system
This commit is contained in:
Arisotura
2024-06-15 13:52:47 +02:00
committed by GitHub
parent 8e9b88d01d
commit 25a7b1ca1d
111 changed files with 16802 additions and 5042 deletions

View File

@ -89,8 +89,9 @@ NDS::NDS() noexcept :
{
}
NDS::NDS(NDSArgs&& args, int type) noexcept :
NDS::NDS(NDSArgs&& args, int type, void* userdata) noexcept :
ConsoleType(type),
UserData(userdata),
ARM7BIOS(*args.ARM7BIOS),
ARM9BIOS(*args.ARM9BIOS),
ARM7BIOSNative(CRC32(ARM7BIOS.data(), ARM7BIOS.size()) == ARM7BIOSCRC32),
@ -102,7 +103,7 @@ NDS::NDS(NDSArgs&& args, int type) noexcept :
RTC(*this),
Wifi(*this),
NDSCartSlot(*this, std::move(args.NDSROM)),
GBACartSlot(type == 1 ? nullptr : std::move(args.GBAROM)),
GBACartSlot(*this, type == 1 ? nullptr : std::move(args.GBAROM)),
AREngine(*this),
ARM9(*this, args.GDB, args.JIT.has_value()),
ARM7(*this, args.GDB, args.JIT.has_value()),
@ -574,7 +575,7 @@ void NDS::Stop(Platform::StopReason reason)
Log(level, "Stopping emulated console (Reason: %s)\n", StopReasonName(reason));
Running = false;
Platform::SignalStop(reason);
Platform::SignalStop(reason, UserData);
GPU.Stop();
SPU.Stop();
}