Core: Pass Netplay SRAM through boot process.

This removes the Netplay classes touching emulated hardware structures before emulation even starts.
This commit is contained in:
Admiral H. Curtiss
2022-09-13 04:44:59 +02:00
parent 9963637463
commit 0a517ebdbd
12 changed files with 37 additions and 56 deletions

View File

@ -511,7 +511,7 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi
AudioCommon::InitSoundStream();
Common::ScopeGuard audio_guard{&AudioCommon::ShutdownSoundStream};
HW::Init();
HW::Init(NetPlay::IsNetPlayRunning() ? &(boot_session_data.GetNetplaySettings()->sram) : nullptr);
Common::ScopeGuard hw_guard{[] {
// We must set up this flag before executing HW::Shutdown()