From 5dea8a125bad8632893ab33a48465fe5ec5c8a63 Mon Sep 17 00:00:00 2001 From: PTRCoder Date: Fri, 23 Aug 2024 16:00:35 +0200 Subject: [PATCH] Moved kernel retrieval to argument --- src/core/hle/service/ac/ac.cpp | 4 ++-- src/core/hle/service/nwm/nwm_inf.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/hle/service/ac/ac.cpp b/src/core/hle/service/ac/ac.cpp index 1f64b29e5..e03539306 100644 --- a/src/core/hle/service/ac/ac.cpp +++ b/src/core/hle/service/ac/ac.cpp @@ -219,12 +219,12 @@ void Module::Interface::ScanAPs(Kernel::HLERequestContext& ctx) { cmd_buf[18] = (size << 4) | 12; cmd_buf[19] = buffer_id; - Kernel::KernelSystem kernel = Core::System::GetInstance().Kernel(); std::shared_ptr thread = ctx.ClientThread(); auto current_process = thread->owner_process.lock(); auto context = - std::make_shared(kernel, SharedFrom(this), thread); + std::make_shared(Core::System::GetInstance().Kernel(), + SharedFrom(this), thread); context->PopulateFromIncomingCommandBuffer(cmd_buf.data(), current_process); auto nwm_inf = diff --git a/src/core/hle/service/nwm/nwm_inf.cpp b/src/core/hle/service/nwm/nwm_inf.cpp index 25f955fbe..aecc733d3 100644 --- a/src/core/hle/service/nwm/nwm_inf.cpp +++ b/src/core/hle/service/nwm/nwm_inf.cpp @@ -27,11 +27,11 @@ void NWM_INF::RecvBeaconBroadcastData(Kernel::HLERequestContext& ctx) { cmd_buf[i] = ctx_data[i - 1]; } - Kernel::KernelSystem kernel = Core::System::GetInstance().Kernel(); std::shared_ptr thread = ctx.ClientThread(); auto current_process = thread->owner_process.lock(); auto context = - std::make_shared(kernel, SharedFrom(this), thread); + std::make_shared(Core::System::GetInstance().Kernel(), + SharedFrom(this), thread); context->PopulateFromIncomingCommandBuffer(cmd_buf.data(), current_process); auto nwm_uds = Core::System::GetInstance().ServiceManager().GetService("nwm::UDS");