diff --git a/src/core/core.cpp b/src/core/core.cpp index b61c2a589..00e79ae8b 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -413,6 +413,7 @@ System::ResultStatus System::Load(Frontend::EmuWindow& emu_window, const std::st apt->GetAppletManager()->SetSysMenuArg(restore_sys_menu_arg.value()); restore_sys_menu_arg.reset(); } + apt->SetWirelessRebootInfoBuffer(restore_wireless_reboot_info); } if (restore_plugin_context.has_value()) { @@ -737,6 +738,7 @@ void System::Reset() { if (auto apt = Service::APT::GetModule(*this)) { restore_deliver_arg = apt->GetAppletManager()->ReceiveDeliverArg(); restore_sys_menu_arg = apt->GetAppletManager()->GetSysMenuArg(); + restore_wireless_reboot_info = apt->GetWirelessRebootInfoBuffer(); } if (auto plg_ldr = Service::PLGLDR::GetService(*this)) { restore_plugin_context = plg_ldr->GetPluginLoaderContext(); diff --git a/src/core/core.h b/src/core/core.h index b33fea174..085a7b3b0 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -489,6 +489,7 @@ private: boost::optional restore_sys_menu_arg; boost::optional restore_plugin_context; std::unique_ptr restore_ipc_recorder; + std::vector restore_wireless_reboot_info; std::vector lle_modules; diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp index 14035af1a..fcc9b2a89 100644 --- a/src/core/hle/service/apt/apt.cpp +++ b/src/core/hle/service/apt/apt.cpp @@ -1493,6 +1493,14 @@ std::shared_ptr Module::GetAppletManager() const { return applet_manager; } +std::vector Module::GetWirelessRebootInfoBuffer() const { + return wireless_reboot_info; +} + +void Module::SetWirelessRebootInfoBuffer(std::vector info_buf) { + wireless_reboot_info = info_buf; +} + std::shared_ptr GetModule(Core::System& system) { auto apt = system.ServiceManager().GetService("APT:A"); if (!apt) diff --git a/src/core/hle/service/apt/apt.h b/src/core/hle/service/apt/apt.h index b52ba3655..85b92bb60 100644 --- a/src/core/hle/service/apt/apt.h +++ b/src/core/hle/service/apt/apt.h @@ -51,6 +51,9 @@ public: std::shared_ptr GetAppletManager() const; + std::vector GetWirelessRebootInfoBuffer() const; + void SetWirelessRebootInfoBuffer(std::vector info_buf); + class NSInterface : public ServiceFramework { public: NSInterface(std::shared_ptr apt, const char* name, u32 max_session); @@ -1093,7 +1096,7 @@ private: std::shared_ptr applet_manager; - static inline std::vector wireless_reboot_info; + std::vector wireless_reboot_info; template void serialize(Archive& ar, const unsigned int); diff --git a/src/core/hle/service/nwm/nwm_uds.cpp b/src/core/hle/service/nwm/nwm_uds.cpp index 7ebbbe1a5..43547ee42 100644 --- a/src/core/hle/service/nwm/nwm_uds.cpp +++ b/src/core/hle/service/nwm/nwm_uds.cpp @@ -1271,7 +1271,7 @@ void NWM_UDS::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) { static constexpr std::chrono::nanoseconds UDSBeaconScanInterval{300000000}; ctx.SleepClientThread("uds::RecvBeaconBroadcastData", UDSBeaconScanInterval, - std::make_shared(0xF)); + std::make_shared(0xF)); // Retrieve all beacon frames that were received from the desired mac address. auto beacons = GetReceivedBeacons(mac_address);