summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar Liam2023-02-13 11:21:43 -0500
committerGravatar Liam2023-02-13 19:03:12 -0500
commitceda2d280e8a3030c1e23083c5cea9158387fe4c (patch)
tree8041460840ed81d4cb74d87eecfb8fb720cdfa15 /src/core/hle
parentkernel: use GetCurrentProcess (diff)
downloadyuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.gz
yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.xz
yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.zip
general: rename CurrentProcess to ApplicationProcess
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/ipc_helpers.h2
-rw-r--r--src/core/hle/kernel/k_client_port.cpp2
-rw-r--r--src/core/hle/kernel/k_handle_table.h3
-rw-r--r--src/core/hle/kernel/k_session.cpp2
-rw-r--r--src/core/hle/kernel/kernel.cpp46
-rw-r--r--src/core/hle/kernel/kernel.h24
-rw-r--r--src/core/hle/service/acc/acc.cpp4
-rw-r--r--src/core/hle/service/am/am.cpp22
-rw-r--r--src/core/hle/service/am/applets/applet_error.cpp2
-rw-r--r--src/core/hle/service/am/applets/applet_general_backend.cpp2
-rw-r--r--src/core/hle/service/am/applets/applet_web_browser.cpp2
-rw-r--r--src/core/hle/service/aoc/aoc_u.cpp6
-rw-r--r--src/core/hle/service/audio/audren_u.cpp2
-rw-r--r--src/core/hle/service/bcat/bcat_module.cpp10
-rw-r--r--src/core/hle/service/fatal/fatal.cpp2
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp4
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp5
-rw-r--r--src/core/hle/service/hid/hid.cpp8
-rw-r--r--src/core/hle/service/hid/hidbus.cpp4
-rw-r--r--src/core/hle/service/hid/irs.cpp8
-rw-r--r--src/core/hle/service/jit/jit.cpp4
-rw-r--r--src/core/hle/service/ldr/ldr.cpp13
-rw-r--r--src/core/hle/service/nfp/nfp_device.cpp2
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp4
-rw-r--r--src/core/hle/service/nvdrv/devices/nvmap.cpp4
-rw-r--r--src/core/hle/service/pctl/pctl_module.cpp2
-rw-r--r--src/core/hle/service/prepo/prepo.cpp4
27 files changed, 99 insertions, 94 deletions
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h
index a86bec252..38d6cfaff 100644
--- a/src/core/hle/ipc_helpers.h
+++ b/src/core/hle/ipc_helpers.h
@@ -148,7 +148,7 @@ public:
148 if (context->GetManager()->IsDomain()) { 148 if (context->GetManager()->IsDomain()) {
149 context->AddDomainObject(std::move(iface)); 149 context->AddDomainObject(std::move(iface));
150 } else { 150 } else {
151 kernel.CurrentProcess()->GetResourceLimit()->Reserve( 151 kernel.ApplicationProcess()->GetResourceLimit()->Reserve(
152 Kernel::LimitableResource::SessionCountMax, 1); 152 Kernel::LimitableResource::SessionCountMax, 1);
153 153
154 auto* session = Kernel::KSession::Create(kernel); 154 auto* session = Kernel::KSession::Create(kernel);
diff --git a/src/core/hle/kernel/k_client_port.cpp b/src/core/hle/kernel/k_client_port.cpp
index 9a540987b..c72a91a76 100644
--- a/src/core/hle/kernel/k_client_port.cpp
+++ b/src/core/hle/kernel/k_client_port.cpp
@@ -61,7 +61,7 @@ bool KClientPort::IsSignaled() const {
61Result KClientPort::CreateSession(KClientSession** out) { 61Result KClientPort::CreateSession(KClientSession** out) {
62 // Reserve a new session from the resource limit. 62 // Reserve a new session from the resource limit.
63 //! FIXME: we are reserving this from the wrong resource limit! 63 //! FIXME: we are reserving this from the wrong resource limit!
64 KScopedResourceReservation session_reservation(kernel.CurrentProcess()->GetResourceLimit(), 64 KScopedResourceReservation session_reservation(kernel.ApplicationProcess()->GetResourceLimit(),
65 LimitableResource::SessionCountMax); 65 LimitableResource::SessionCountMax);
66 R_UNLESS(session_reservation.Succeeded(), ResultLimitReached); 66 R_UNLESS(session_reservation.Succeeded(), ResultLimitReached);
67 67
diff --git a/src/core/hle/kernel/k_handle_table.h b/src/core/hle/kernel/k_handle_table.h
index 1bf68e6b0..d7660630c 100644
--- a/src/core/hle/kernel/k_handle_table.h
+++ b/src/core/hle/kernel/k_handle_table.h
@@ -90,7 +90,8 @@ public:
90 // Handle pseudo-handles. 90 // Handle pseudo-handles.
91 if constexpr (std::derived_from<KProcess, T>) { 91 if constexpr (std::derived_from<KProcess, T>) {
92 if (handle == Svc::PseudoHandle::CurrentProcess) { 92 if (handle == Svc::PseudoHandle::CurrentProcess) {
93 auto* const cur_process = GetCurrentProcessPointer(m_kernel); 93 //! FIXME: this is the wrong process!
94 auto* const cur_process = m_kernel.ApplicationProcess();
94 ASSERT(cur_process != nullptr); 95 ASSERT(cur_process != nullptr);
95 return cur_process; 96 return cur_process;
96 } 97 }
diff --git a/src/core/hle/kernel/k_session.cpp b/src/core/hle/kernel/k_session.cpp
index 819f39f12..7e677c028 100644
--- a/src/core/hle/kernel/k_session.cpp
+++ b/src/core/hle/kernel/k_session.cpp
@@ -34,7 +34,7 @@ void KSession::Initialize(KClientPort* port_, const std::string& name_) {
34 34
35 // Set our owner process. 35 // Set our owner process.
36 //! FIXME: this is the wrong process! 36 //! FIXME: this is the wrong process!
37 process = kernel.CurrentProcess(); 37 process = kernel.ApplicationProcess();
38 process->Open(); 38 process->Open();
39 39
40 // Set our port. 40 // Set our port.
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 5b72eaaa1..b1922659d 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -102,13 +102,13 @@ struct KernelCore::Impl {
102 102
103 void InitializeCores() { 103 void InitializeCores() {
104 for (u32 core_id = 0; core_id < Core::Hardware::NUM_CPU_CORES; core_id++) { 104 for (u32 core_id = 0; core_id < Core::Hardware::NUM_CPU_CORES; core_id++) {
105 cores[core_id]->Initialize((*current_process).Is64BitProcess()); 105 cores[core_id]->Initialize((*application_process).Is64BitProcess());
106 system.Memory().SetCurrentPageTable(*current_process, core_id); 106 system.Memory().SetCurrentPageTable(*application_process, core_id);
107 } 107 }
108 } 108 }
109 109
110 void CloseCurrentProcess() { 110 void CloseApplicationProcess() {
111 KProcess* old_process = current_process.exchange(nullptr); 111 KProcess* old_process = application_process.exchange(nullptr);
112 if (old_process == nullptr) { 112 if (old_process == nullptr) {
113 return; 113 return;
114 } 114 }
@@ -182,7 +182,7 @@ struct KernelCore::Impl {
182 } 182 }
183 } 183 }
184 184
185 CloseCurrentProcess(); 185 CloseApplicationProcess();
186 186
187 // Track kernel objects that were not freed on shutdown 187 // Track kernel objects that were not freed on shutdown
188 { 188 {
@@ -363,8 +363,8 @@ struct KernelCore::Impl {
363 } 363 }
364 } 364 }
365 365
366 void MakeCurrentProcess(KProcess* process) { 366 void MakeApplicationProcess(KProcess* process) {
367 current_process = process; 367 application_process = process;
368 } 368 }
369 369
370 static inline thread_local u32 host_thread_id = UINT32_MAX; 370 static inline thread_local u32 host_thread_id = UINT32_MAX;
@@ -821,7 +821,7 @@ struct KernelCore::Impl {
821 821
822 // Lists all processes that exist in the current session. 822 // Lists all processes that exist in the current session.
823 std::vector<KProcess*> process_list; 823 std::vector<KProcess*> process_list;
824 std::atomic<KProcess*> current_process{}; 824 std::atomic<KProcess*> application_process{};
825 std::unique_ptr<Kernel::GlobalSchedulerContext> global_scheduler_context; 825 std::unique_ptr<Kernel::GlobalSchedulerContext> global_scheduler_context;
826 std::unique_ptr<Kernel::KHardwareTimer> hardware_timer; 826 std::unique_ptr<Kernel::KHardwareTimer> hardware_timer;
827 827
@@ -941,20 +941,20 @@ void KernelCore::AppendNewProcess(KProcess* process) {
941 impl->process_list.push_back(process); 941 impl->process_list.push_back(process);
942} 942}
943 943
944void KernelCore::MakeCurrentProcess(KProcess* process) { 944void KernelCore::MakeApplicationProcess(KProcess* process) {
945 impl->MakeCurrentProcess(process); 945 impl->MakeApplicationProcess(process);
946} 946}
947 947
948KProcess* KernelCore::CurrentProcess() { 948KProcess* KernelCore::ApplicationProcess() {
949 return impl->current_process; 949 return impl->application_process;
950} 950}
951 951
952const KProcess* KernelCore::CurrentProcess() const { 952const KProcess* KernelCore::ApplicationProcess() const {
953 return impl->current_process; 953 return impl->application_process;
954} 954}
955 955
956void KernelCore::CloseCurrentProcess() { 956void KernelCore::CloseApplicationProcess() {
957 impl->CloseCurrentProcess(); 957 impl->CloseApplicationProcess();
958} 958}
959 959
960const std::vector<KProcess*>& KernelCore::GetProcessList() const { 960const std::vector<KProcess*>& KernelCore::GetProcessList() const {
@@ -1202,12 +1202,12 @@ const Kernel::KSharedMemory& KernelCore::GetHidBusSharedMem() const {
1202 return *impl->hidbus_shared_mem; 1202 return *impl->hidbus_shared_mem;
1203} 1203}
1204 1204
1205void KernelCore::Suspend(bool suspended) { 1205void KernelCore::SuspendApplication(bool suspended) {
1206 const bool should_suspend{exception_exited || suspended}; 1206 const bool should_suspend{exception_exited || suspended};
1207 const auto activity = should_suspend ? ProcessActivity::Paused : ProcessActivity::Runnable; 1207 const auto activity = should_suspend ? ProcessActivity::Paused : ProcessActivity::Runnable;
1208 1208
1209 //! This refers to the application process, not the current process. 1209 // Get the application process.
1210 KScopedAutoObject<KProcess> process = CurrentProcess(); 1210 KScopedAutoObject<KProcess> process = ApplicationProcess();
1211 if (process.IsNull()) { 1211 if (process.IsNull()) {
1212 return; 1212 return;
1213 } 1213 }
@@ -1218,8 +1218,8 @@ void KernelCore::Suspend(bool suspended) {
1218 // Wait for process execution to stop. 1218 // Wait for process execution to stop.
1219 bool must_wait{should_suspend}; 1219 bool must_wait{should_suspend};
1220 1220
1221 // KernelCore::Suspend must be called from locked context, or we 1221 // KernelCore::SuspendApplication must be called from locked context,
1222 // could race another call to SetActivity, interfering with waiting. 1222 // or we could race another call to SetActivity, interfering with waiting.
1223 while (must_wait) { 1223 while (must_wait) {
1224 KScopedSchedulerLock sl{*this}; 1224 KScopedSchedulerLock sl{*this};
1225 1225
@@ -1253,9 +1253,9 @@ bool KernelCore::IsShuttingDown() const {
1253 return impl->IsShuttingDown(); 1253 return impl->IsShuttingDown();
1254} 1254}
1255 1255
1256void KernelCore::ExceptionalExit() { 1256void KernelCore::ExceptionalExitApplication() {
1257 exception_exited = true; 1257 exception_exited = true;
1258 Suspend(true); 1258 SuspendApplication(true);
1259} 1259}
1260 1260
1261void KernelCore::EnterSVCProfile() { 1261void KernelCore::EnterSVCProfile() {
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index af0ae0e98..a236e6b42 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -131,17 +131,17 @@ public:
131 /// Adds the given shared pointer to an internal list of active processes. 131 /// Adds the given shared pointer to an internal list of active processes.
132 void AppendNewProcess(KProcess* process); 132 void AppendNewProcess(KProcess* process);
133 133
134 /// Makes the given process the new current process. 134 /// Makes the given process the new application process.
135 void MakeCurrentProcess(KProcess* process); 135 void MakeApplicationProcess(KProcess* process);
136 136
137 /// Retrieves a pointer to the current process. 137 /// Retrieves a pointer to the application process.
138 KProcess* CurrentProcess(); 138 KProcess* ApplicationProcess();
139 139
140 /// Retrieves a const pointer to the current process. 140 /// Retrieves a const pointer to the application process.
141 const KProcess* CurrentProcess() const; 141 const KProcess* ApplicationProcess() const;
142 142
143 /// Closes the current process. 143 /// Closes the application process.
144 void CloseCurrentProcess(); 144 void CloseApplicationProcess();
145 145
146 /// Retrieves the list of processes. 146 /// Retrieves the list of processes.
147 const std::vector<KProcess*>& GetProcessList() const; 147 const std::vector<KProcess*>& GetProcessList() const;
@@ -288,11 +288,11 @@ public:
288 /// Gets the shared memory object for HIDBus services. 288 /// Gets the shared memory object for HIDBus services.
289 const Kernel::KSharedMemory& GetHidBusSharedMem() const; 289 const Kernel::KSharedMemory& GetHidBusSharedMem() const;
290 290
291 /// Suspend/unsuspend all processes. 291 /// Suspend/unsuspend application process.
292 void Suspend(bool suspend); 292 void SuspendApplication(bool suspend);
293 293
294 /// Exceptional exit all processes. 294 /// Exceptional exit application process.
295 void ExceptionalExit(); 295 void ExceptionalExitApplication();
296 296
297 /// Notify emulated CPU cores to shut down. 297 /// Notify emulated CPU cores to shut down.
298 void ShutdownCores(); 298 void ShutdownCores();
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index 6d1084fd1..1495d64de 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -762,7 +762,7 @@ Result Module::Interface::InitializeApplicationInfoBase() {
762 // processes emulated. As we don't actually have pid support we should assume we're just using 762 // processes emulated. As we don't actually have pid support we should assume we're just using
763 // our own process 763 // our own process
764 const auto launch_property = 764 const auto launch_property =
765 system.GetARPManager().GetLaunchProperty(system.GetCurrentProcessProgramID()); 765 system.GetARPManager().GetLaunchProperty(system.GetApplicationProcessProgramID());
766 766
767 if (launch_property.Failed()) { 767 if (launch_property.Failed()) {
768 LOG_ERROR(Service_ACC, "Failed to get launch property"); 768 LOG_ERROR(Service_ACC, "Failed to get launch property");
@@ -806,7 +806,7 @@ void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx
806 bool is_locked = false; 806 bool is_locked = false;
807 807
808 if (res != Loader::ResultStatus::Success) { 808 if (res != Loader::ResultStatus::Success) {
809 const FileSys::PatchManager pm{system.GetCurrentProcessProgramID(), 809 const FileSys::PatchManager pm{system.GetApplicationProcessProgramID(),
810 system.GetFileSystemController(), 810 system.GetFileSystemController(),
811 system.GetContentProvider()}; 811 system.GetContentProvider()};
812 const auto nacp_unique = pm.GetControlMetadata().first; 812 const auto nacp_unique = pm.GetControlMetadata().first;
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index ebcf6e164..615dd65f3 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -79,7 +79,7 @@ IWindowController::IWindowController(Core::System& system_)
79IWindowController::~IWindowController() = default; 79IWindowController::~IWindowController() = default;
80 80
81void IWindowController::GetAppletResourceUserId(Kernel::HLERequestContext& ctx) { 81void IWindowController::GetAppletResourceUserId(Kernel::HLERequestContext& ctx) {
82 const u64 process_id = system.CurrentProcess()->GetProcessID(); 82 const u64 process_id = system.ApplicationProcess()->GetProcessID();
83 83
84 LOG_DEBUG(Service_AM, "called. Process ID=0x{:016X}", process_id); 84 LOG_DEBUG(Service_AM, "called. Process ID=0x{:016X}", process_id);
85 85
@@ -1252,7 +1252,7 @@ void ILibraryAppletCreator::CreateTransferMemoryStorage(Kernel::HLERequestContex
1252 } 1252 }
1253 1253
1254 auto transfer_mem = 1254 auto transfer_mem =
1255 system.CurrentProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(handle); 1255 system.ApplicationProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(handle);
1256 1256
1257 if (transfer_mem.IsNull()) { 1257 if (transfer_mem.IsNull()) {
1258 LOG_ERROR(Service_AM, "transfer_mem is a nullptr for handle={:08X}", handle); 1258 LOG_ERROR(Service_AM, "transfer_mem is a nullptr for handle={:08X}", handle);
@@ -1286,7 +1286,7 @@ void ILibraryAppletCreator::CreateHandleStorage(Kernel::HLERequestContext& ctx)
1286 } 1286 }
1287 1287
1288 auto transfer_mem = 1288 auto transfer_mem =
1289 system.CurrentProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(handle); 1289 system.ApplicationProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(handle);
1290 1290
1291 if (transfer_mem.IsNull()) { 1291 if (transfer_mem.IsNull()) {
1292 LOG_ERROR(Service_AM, "transfer_mem is a nullptr for handle={:08X}", handle); 1292 LOG_ERROR(Service_AM, "transfer_mem is a nullptr for handle={:08X}", handle);
@@ -1465,11 +1465,12 @@ void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) {
1465 const auto backend = BCAT::CreateBackendFromSettings(system, [this](u64 tid) { 1465 const auto backend = BCAT::CreateBackendFromSettings(system, [this](u64 tid) {
1466 return system.GetFileSystemController().GetBCATDirectory(tid); 1466 return system.GetFileSystemController().GetBCATDirectory(tid);
1467 }); 1467 });
1468 const auto build_id_full = system.GetCurrentProcessBuildID(); 1468 const auto build_id_full = system.GetApplicationProcessBuildID();
1469 u64 build_id{}; 1469 u64 build_id{};
1470 std::memcpy(&build_id, build_id_full.data(), sizeof(u64)); 1470 std::memcpy(&build_id, build_id_full.data(), sizeof(u64));
1471 1471
1472 auto data = backend->GetLaunchParameter({system.GetCurrentProcessProgramID(), build_id}); 1472 auto data =
1473 backend->GetLaunchParameter({system.GetApplicationProcessProgramID(), build_id});
1473 if (data.has_value()) { 1474 if (data.has_value()) {
1474 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 1475 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
1475 rb.Push(ResultSuccess); 1476 rb.Push(ResultSuccess);
@@ -1521,7 +1522,7 @@ void IApplicationFunctions::EnsureSaveData(Kernel::HLERequestContext& ctx) {
1521 LOG_DEBUG(Service_AM, "called, uid={:016X}{:016X}", user_id[1], user_id[0]); 1522 LOG_DEBUG(Service_AM, "called, uid={:016X}{:016X}", user_id[1], user_id[0]);
1522 1523
1523 FileSys::SaveDataAttribute attribute{}; 1524 FileSys::SaveDataAttribute attribute{};
1524 attribute.title_id = system.GetCurrentProcessProgramID(); 1525 attribute.title_id = system.GetApplicationProcessProgramID();
1525 attribute.user_id = user_id; 1526 attribute.user_id = user_id;
1526 attribute.type = FileSys::SaveDataType::SaveData; 1527 attribute.type = FileSys::SaveDataType::SaveData;
1527 const auto res = system.GetFileSystemController().CreateSaveData( 1528 const auto res = system.GetFileSystemController().CreateSaveData(
@@ -1551,7 +1552,7 @@ void IApplicationFunctions::GetDisplayVersion(Kernel::HLERequestContext& ctx) {
1551 std::array<u8, 0x10> version_string{}; 1552 std::array<u8, 0x10> version_string{};
1552 1553
1553 const auto res = [this] { 1554 const auto res = [this] {
1554 const auto title_id = system.GetCurrentProcessProgramID(); 1555 const auto title_id = system.GetApplicationProcessProgramID();
1555 1556
1556 const FileSys::PatchManager pm{title_id, system.GetFileSystemController(), 1557 const FileSys::PatchManager pm{title_id, system.GetFileSystemController(),
1557 system.GetContentProvider()}; 1558 system.GetContentProvider()};
@@ -1588,7 +1589,7 @@ void IApplicationFunctions::GetDesiredLanguage(Kernel::HLERequestContext& ctx) {
1588 u32 supported_languages = 0; 1589 u32 supported_languages = 0;
1589 1590
1590 const auto res = [this] { 1591 const auto res = [this] {
1591 const auto title_id = system.GetCurrentProcessProgramID(); 1592 const auto title_id = system.GetApplicationProcessProgramID();
1592 1593
1593 const FileSys::PatchManager pm{title_id, system.GetFileSystemController(), 1594 const FileSys::PatchManager pm{title_id, system.GetFileSystemController(),
1594 system.GetContentProvider()}; 1595 system.GetContentProvider()};
@@ -1696,7 +1697,8 @@ void IApplicationFunctions::ExtendSaveData(Kernel::HLERequestContext& ctx) {
1696 static_cast<u8>(type), user_id[1], user_id[0], new_normal_size, new_journal_size); 1697 static_cast<u8>(type), user_id[1], user_id[0], new_normal_size, new_journal_size);
1697 1698
1698 system.GetFileSystemController().WriteSaveDataSize( 1699 system.GetFileSystemController().WriteSaveDataSize(
1699 type, system.GetCurrentProcessProgramID(), user_id, {new_normal_size, new_journal_size}); 1700 type, system.GetApplicationProcessProgramID(), user_id,
1701 {new_normal_size, new_journal_size});
1700 1702
1701 IPC::ResponseBuilder rb{ctx, 4}; 1703 IPC::ResponseBuilder rb{ctx, 4};
1702 rb.Push(ResultSuccess); 1704 rb.Push(ResultSuccess);
@@ -1720,7 +1722,7 @@ void IApplicationFunctions::GetSaveDataSize(Kernel::HLERequestContext& ctx) {
1720 user_id[0]); 1722 user_id[0]);
1721 1723
1722 const auto size = system.GetFileSystemController().ReadSaveDataSize( 1724 const auto size = system.GetFileSystemController().ReadSaveDataSize(
1723 type, system.GetCurrentProcessProgramID(), user_id); 1725 type, system.GetApplicationProcessProgramID(), user_id);
1724 1726
1725 IPC::ResponseBuilder rb{ctx, 6}; 1727 IPC::ResponseBuilder rb{ctx, 6};
1726 rb.Push(ResultSuccess); 1728 rb.Push(ResultSuccess);
diff --git a/src/core/hle/service/am/applets/applet_error.cpp b/src/core/hle/service/am/applets/applet_error.cpp
index bae0d99a6..b013896b4 100644
--- a/src/core/hle/service/am/applets/applet_error.cpp
+++ b/src/core/hle/service/am/applets/applet_error.cpp
@@ -166,7 +166,7 @@ void Error::Execute() {
166 } 166 }
167 167
168 const auto callback = [this] { DisplayCompleted(); }; 168 const auto callback = [this] { DisplayCompleted(); };
169 const auto title_id = system.GetCurrentProcessProgramID(); 169 const auto title_id = system.GetApplicationProcessProgramID();
170 const auto& reporter{system.GetReporter()}; 170 const auto& reporter{system.GetReporter()};
171 171
172 switch (mode) { 172 switch (mode) {
diff --git a/src/core/hle/service/am/applets/applet_general_backend.cpp b/src/core/hle/service/am/applets/applet_general_backend.cpp
index e50acdaf6..1eefa85e3 100644
--- a/src/core/hle/service/am/applets/applet_general_backend.cpp
+++ b/src/core/hle/service/am/applets/applet_general_backend.cpp
@@ -186,7 +186,7 @@ void PhotoViewer::Execute() {
186 const auto callback = [this] { ViewFinished(); }; 186 const auto callback = [this] { ViewFinished(); };
187 switch (mode) { 187 switch (mode) {
188 case PhotoViewerAppletMode::CurrentApp: 188 case PhotoViewerAppletMode::CurrentApp:
189 frontend.ShowPhotosForApplication(system.GetCurrentProcessProgramID(), callback); 189 frontend.ShowPhotosForApplication(system.GetApplicationProcessProgramID(), callback);
190 break; 190 break;
191 case PhotoViewerAppletMode::AllApps: 191 case PhotoViewerAppletMode::AllApps:
192 frontend.ShowAllPhotos(callback); 192 frontend.ShowAllPhotos(callback);
diff --git a/src/core/hle/service/am/applets/applet_web_browser.cpp b/src/core/hle/service/am/applets/applet_web_browser.cpp
index 14aa6f69e..f061bae80 100644
--- a/src/core/hle/service/am/applets/applet_web_browser.cpp
+++ b/src/core/hle/service/am/applets/applet_web_browser.cpp
@@ -393,7 +393,7 @@ void WebBrowser::InitializeOffline() {
393 switch (document_kind) { 393 switch (document_kind) {
394 case DocumentKind::OfflineHtmlPage: 394 case DocumentKind::OfflineHtmlPage:
395 default: 395 default:
396 title_id = system.GetCurrentProcessProgramID(); 396 title_id = system.GetApplicationProcessProgramID();
397 nca_type = FileSys::ContentRecordType::HtmlDocument; 397 nca_type = FileSys::ContentRecordType::HtmlDocument;
398 additional_paths = "html-document"; 398 additional_paths = "html-document";
399 break; 399 break;
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp
index 368ccd52f..7264f23f9 100644
--- a/src/core/hle/service/aoc/aoc_u.cpp
+++ b/src/core/hle/service/aoc/aoc_u.cpp
@@ -155,7 +155,7 @@ void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) {
155 IPC::ResponseBuilder rb{ctx, 3}; 155 IPC::ResponseBuilder rb{ctx, 3};
156 rb.Push(ResultSuccess); 156 rb.Push(ResultSuccess);
157 157
158 const auto current = system.GetCurrentProcessProgramID(); 158 const auto current = system.GetApplicationProcessProgramID();
159 159
160 const auto& disabled = Settings::values.disabled_addons[current]; 160 const auto& disabled = Settings::values.disabled_addons[current];
161 if (std::find(disabled.begin(), disabled.end(), "DLC") != disabled.end()) { 161 if (std::find(disabled.begin(), disabled.end(), "DLC") != disabled.end()) {
@@ -182,7 +182,7 @@ void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) {
182 LOG_DEBUG(Service_AOC, "called with offset={}, count={}, process_id={}", offset, count, 182 LOG_DEBUG(Service_AOC, "called with offset={}, count={}, process_id={}", offset, count,
183 process_id); 183 process_id);
184 184
185 const auto current = system.GetCurrentProcessProgramID(); 185 const auto current = system.GetApplicationProcessProgramID();
186 186
187 std::vector<u32> out; 187 std::vector<u32> out;
188 const auto& disabled = Settings::values.disabled_addons[current]; 188 const auto& disabled = Settings::values.disabled_addons[current];
@@ -228,7 +228,7 @@ void AOC_U::GetAddOnContentBaseId(Kernel::HLERequestContext& ctx) {
228 IPC::ResponseBuilder rb{ctx, 4}; 228 IPC::ResponseBuilder rb{ctx, 4};
229 rb.Push(ResultSuccess); 229 rb.Push(ResultSuccess);
230 230
231 const auto title_id = system.GetCurrentProcessProgramID(); 231 const auto title_id = system.GetApplicationProcessProgramID();
232 const FileSys::PatchManager pm{title_id, system.GetFileSystemController(), 232 const FileSys::PatchManager pm{title_id, system.GetFileSystemController(),
233 system.GetContentProvider()}; 233 system.GetContentProvider()};
234 234
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp
index 0ee28752c..7d730421d 100644
--- a/src/core/hle/service/audio/audren_u.cpp
+++ b/src/core/hle/service/audio/audren_u.cpp
@@ -455,7 +455,7 @@ void AudRenU::OpenAudioRenderer(Kernel::HLERequestContext& ctx) {
455 return; 455 return;
456 } 456 }
457 457
458 const auto& handle_table{system.CurrentProcess()->GetHandleTable()}; 458 const auto& handle_table{system.ApplicationProcess()->GetHandleTable()};
459 auto process{handle_table.GetObject<Kernel::KProcess>(process_handle)}; 459 auto process{handle_table.GetObject<Kernel::KProcess>(process_handle)};
460 auto transfer_memory{ 460 auto transfer_memory{
461 process->GetHandleTable().GetObject<Kernel::KTransferMemory>(transfer_memory_handle)}; 461 process->GetHandleTable().GetObject<Kernel::KTransferMemory>(transfer_memory_handle)};
diff --git a/src/core/hle/service/bcat/bcat_module.cpp b/src/core/hle/service/bcat/bcat_module.cpp
index cbe690a5d..6e6fed227 100644
--- a/src/core/hle/service/bcat/bcat_module.cpp
+++ b/src/core/hle/service/bcat/bcat_module.cpp
@@ -176,8 +176,8 @@ private:
176 void RequestSyncDeliveryCache(Kernel::HLERequestContext& ctx) { 176 void RequestSyncDeliveryCache(Kernel::HLERequestContext& ctx) {
177 LOG_DEBUG(Service_BCAT, "called"); 177 LOG_DEBUG(Service_BCAT, "called");
178 178
179 backend.Synchronize({system.GetCurrentProcessProgramID(), 179 backend.Synchronize({system.GetApplicationProcessProgramID(),
180 GetCurrentBuildID(system.GetCurrentProcessBuildID())}, 180 GetCurrentBuildID(system.GetApplicationProcessBuildID())},
181 GetProgressBackend(SyncType::Normal)); 181 GetProgressBackend(SyncType::Normal));
182 182
183 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 183 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
@@ -193,8 +193,8 @@ private:
193 193
194 LOG_DEBUG(Service_BCAT, "called, name={}", name); 194 LOG_DEBUG(Service_BCAT, "called, name={}", name);
195 195
196 backend.SynchronizeDirectory({system.GetCurrentProcessProgramID(), 196 backend.SynchronizeDirectory({system.GetApplicationProcessProgramID(),
197 GetCurrentBuildID(system.GetCurrentProcessBuildID())}, 197 GetCurrentBuildID(system.GetApplicationProcessBuildID())},
198 name, GetProgressBackend(SyncType::Directory)); 198 name, GetProgressBackend(SyncType::Directory));
199 199
200 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 200 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
@@ -554,7 +554,7 @@ private:
554void Module::Interface::CreateDeliveryCacheStorageService(Kernel::HLERequestContext& ctx) { 554void Module::Interface::CreateDeliveryCacheStorageService(Kernel::HLERequestContext& ctx) {
555 LOG_DEBUG(Service_BCAT, "called"); 555 LOG_DEBUG(Service_BCAT, "called");
556 556
557 const auto title_id = system.GetCurrentProcessProgramID(); 557 const auto title_id = system.GetApplicationProcessProgramID();
558 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 558 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
559 rb.Push(ResultSuccess); 559 rb.Push(ResultSuccess);
560 rb.PushIpcInterface<IDeliveryCacheStorageService>(system, fsc.GetBCATDirectory(title_id)); 560 rb.PushIpcInterface<IDeliveryCacheStorageService>(system, fsc.GetBCATDirectory(title_id));
diff --git a/src/core/hle/service/fatal/fatal.cpp b/src/core/hle/service/fatal/fatal.cpp
index 27675615b..2e5919330 100644
--- a/src/core/hle/service/fatal/fatal.cpp
+++ b/src/core/hle/service/fatal/fatal.cpp
@@ -63,7 +63,7 @@ enum class FatalType : u32 {
63}; 63};
64 64
65static void GenerateErrorReport(Core::System& system, Result error_code, const FatalInfo& info) { 65static void GenerateErrorReport(Core::System& system, Result error_code, const FatalInfo& info) {
66 const auto title_id = system.GetCurrentProcessProgramID(); 66 const auto title_id = system.GetApplicationProcessProgramID();
67 std::string crash_report = fmt::format( 67 std::string crash_report = fmt::format(
68 "Yuzu {}-{} crash report\n" 68 "Yuzu {}-{} crash report\n"
69 "Title ID: {:016x}\n" 69 "Title ID: {:016x}\n"
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index 11c604a0f..177447bc1 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -317,7 +317,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenRomFSCurrentProcess()
317 return ResultUnknown; 317 return ResultUnknown;
318 } 318 }
319 319
320 return romfs_factory->OpenCurrentProcess(system.GetCurrentProcessProgramID()); 320 return romfs_factory->OpenCurrentProcess(system.GetApplicationProcessProgramID());
321} 321}
322 322
323ResultVal<FileSys::VirtualFile> FileSystemController::OpenPatchedRomFS( 323ResultVal<FileSys::VirtualFile> FileSystemController::OpenPatchedRomFS(
@@ -502,7 +502,7 @@ FileSys::SaveDataSize FileSystemController::ReadSaveDataSize(FileSys::SaveDataTy
502 const auto res = system.GetAppLoader().ReadControlData(nacp); 502 const auto res = system.GetAppLoader().ReadControlData(nacp);
503 503
504 if (res != Loader::ResultStatus::Success) { 504 if (res != Loader::ResultStatus::Success) {
505 const FileSys::PatchManager pm{system.GetCurrentProcessProgramID(), 505 const FileSys::PatchManager pm{system.GetApplicationProcessProgramID(),
506 system.GetFileSystemController(), 506 system.GetFileSystemController(),
507 system.GetContentProvider()}; 507 system.GetContentProvider()};
508 const auto metadata = pm.GetControlMetadata(); 508 const auto metadata = pm.GetControlMetadata();
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index 447d624e1..e76346ca9 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -1036,8 +1036,9 @@ void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) {
1036 1036
1037 LOG_DEBUG(Service_FS, "called, program_index={}", program_index); 1037 LOG_DEBUG(Service_FS, "called, program_index={}", program_index);
1038 1038
1039 auto patched_romfs = fsc.OpenPatchedRomFSWithProgramIndex( 1039 auto patched_romfs =
1040 system.GetCurrentProcessProgramID(), program_index, FileSys::ContentRecordType::Program); 1040 fsc.OpenPatchedRomFSWithProgramIndex(system.GetApplicationProcessProgramID(), program_index,
1041 FileSys::ContentRecordType::Program);
1041 1042
1042 if (patched_romfs.Failed()) { 1043 if (patched_romfs.Failed()) {
1043 // TODO: Find the right error code to use here 1044 // TODO: Find the right error code to use here
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 5a1aa0903..b0d06ee55 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -1830,7 +1830,7 @@ void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
1830 ASSERT_MSG(t_mem_1_size == 0x1000, "t_mem_1_size is not 0x1000 bytes"); 1830 ASSERT_MSG(t_mem_1_size == 0x1000, "t_mem_1_size is not 0x1000 bytes");
1831 ASSERT_MSG(t_mem_2_size == 0x7F000, "t_mem_2_size is not 0x7F000 bytes"); 1831 ASSERT_MSG(t_mem_2_size == 0x7F000, "t_mem_2_size is not 0x7F000 bytes");
1832 1832
1833 auto t_mem_1 = system.CurrentProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>( 1833 auto t_mem_1 = system.ApplicationProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(
1834 t_mem_1_handle); 1834 t_mem_1_handle);
1835 1835
1836 if (t_mem_1.IsNull()) { 1836 if (t_mem_1.IsNull()) {
@@ -1840,7 +1840,7 @@ void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) {
1840 return; 1840 return;
1841 } 1841 }
1842 1842
1843 auto t_mem_2 = system.CurrentProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>( 1843 auto t_mem_2 = system.ApplicationProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(
1844 t_mem_2_handle); 1844 t_mem_2_handle);
1845 1845
1846 if (t_mem_2.IsNull()) { 1846 if (t_mem_2.IsNull()) {
@@ -2127,8 +2127,8 @@ void Hid::WritePalmaWaveEntry(Kernel::HLERequestContext& ctx) {
2127 2127
2128 ASSERT_MSG(t_mem_size == 0x3000, "t_mem_size is not 0x3000 bytes"); 2128 ASSERT_MSG(t_mem_size == 0x3000, "t_mem_size is not 0x3000 bytes");
2129 2129
2130 auto t_mem = 2130 auto t_mem = system.ApplicationProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(
2131 system.CurrentProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(t_mem_handle); 2131 t_mem_handle);
2132 2132
2133 if (t_mem.IsNull()) { 2133 if (t_mem.IsNull()) {
2134 LOG_ERROR(Service_HID, "t_mem is a nullptr for handle=0x{:08X}", t_mem_handle); 2134 LOG_ERROR(Service_HID, "t_mem is a nullptr for handle=0x{:08X}", t_mem_handle);
diff --git a/src/core/hle/service/hid/hidbus.cpp b/src/core/hle/service/hid/hidbus.cpp
index 17252a84a..bd94e8f3d 100644
--- a/src/core/hle/service/hid/hidbus.cpp
+++ b/src/core/hle/service/hid/hidbus.cpp
@@ -449,8 +449,8 @@ void HidBus::EnableJoyPollingReceiveMode(Kernel::HLERequestContext& ctx) {
449 449
450 ASSERT_MSG(t_mem_size == 0x1000, "t_mem_size is not 0x1000 bytes"); 450 ASSERT_MSG(t_mem_size == 0x1000, "t_mem_size is not 0x1000 bytes");
451 451
452 auto t_mem = 452 auto t_mem = system.ApplicationProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(
453 system.CurrentProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(t_mem_handle); 453 t_mem_handle);
454 454
455 if (t_mem.IsNull()) { 455 if (t_mem.IsNull()) {
456 LOG_ERROR(Service_HID, "t_mem is a nullptr for handle=0x{:08X}", t_mem_handle); 456 LOG_ERROR(Service_HID, "t_mem is a nullptr for handle=0x{:08X}", t_mem_handle);
diff --git a/src/core/hle/service/hid/irs.cpp b/src/core/hle/service/hid/irs.cpp
index 52f402c56..3bd418e92 100644
--- a/src/core/hle/service/hid/irs.cpp
+++ b/src/core/hle/service/hid/irs.cpp
@@ -196,8 +196,8 @@ void IRS::RunImageTransferProcessor(Kernel::HLERequestContext& ctx) {
196 const auto parameters{rp.PopRaw<Parameters>()}; 196 const auto parameters{rp.PopRaw<Parameters>()};
197 const auto t_mem_handle{ctx.GetCopyHandle(0)}; 197 const auto t_mem_handle{ctx.GetCopyHandle(0)};
198 198
199 auto t_mem = 199 auto t_mem = system.ApplicationProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(
200 system.CurrentProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(t_mem_handle); 200 t_mem_handle);
201 201
202 if (t_mem.IsNull()) { 202 if (t_mem.IsNull()) {
203 LOG_ERROR(Service_IRS, "t_mem is a nullptr for handle=0x{:08X}", t_mem_handle); 203 LOG_ERROR(Service_IRS, "t_mem is a nullptr for handle=0x{:08X}", t_mem_handle);
@@ -445,8 +445,8 @@ void IRS::RunImageTransferExProcessor(Kernel::HLERequestContext& ctx) {
445 const auto parameters{rp.PopRaw<Parameters>()}; 445 const auto parameters{rp.PopRaw<Parameters>()};
446 const auto t_mem_handle{ctx.GetCopyHandle(0)}; 446 const auto t_mem_handle{ctx.GetCopyHandle(0)};
447 447
448 auto t_mem = 448 auto t_mem = system.ApplicationProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(
449 system.CurrentProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(t_mem_handle); 449 t_mem_handle);
450 450
451 u8* transfer_memory = system.Memory().GetPointer(t_mem->GetSourceAddress()); 451 u8* transfer_memory = system.Memory().GetPointer(t_mem->GetSourceAddress());
452 452
diff --git a/src/core/hle/service/jit/jit.cpp b/src/core/hle/service/jit/jit.cpp
index 1295a44c7..47a1277ea 100644
--- a/src/core/hle/service/jit/jit.cpp
+++ b/src/core/hle/service/jit/jit.cpp
@@ -353,9 +353,9 @@ public:
353 return; 353 return;
354 } 354 }
355 355
356 // Fetch using the handle table for the current process here, 356 // Fetch using the handle table for the application process here,
357 // since we are not multiprocess yet. 357 // since we are not multiprocess yet.
358 const auto& handle_table{system.CurrentProcess()->GetHandleTable()}; 358 const auto& handle_table{system.ApplicationProcess()->GetHandleTable()};
359 359
360 auto process{handle_table.GetObject<Kernel::KProcess>(process_handle)}; 360 auto process{handle_table.GetObject<Kernel::KProcess>(process_handle)};
361 if (process.IsNull()) { 361 if (process.IsNull()) {
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp
index 652441bc2..2d4d6fe3e 100644
--- a/src/core/hle/service/ldr/ldr.cpp
+++ b/src/core/hle/service/ldr/ldr.cpp
@@ -246,7 +246,7 @@ public:
246 return; 246 return;
247 } 247 }
248 248
249 if (system.GetCurrentProcessProgramID() != header.application_id) { 249 if (system.GetApplicationProcessProgramID() != header.application_id) {
250 LOG_ERROR(Service_LDR, 250 LOG_ERROR(Service_LDR,
251 "Attempting to load NRR with title ID other than current process. (actual " 251 "Attempting to load NRR with title ID other than current process. (actual "
252 "{:016X})!", 252 "{:016X})!",
@@ -542,15 +542,16 @@ public:
542 } 542 }
543 543
544 // Map memory for the NRO 544 // Map memory for the NRO
545 const auto map_result{MapNro(system.CurrentProcess(), nro_address, nro_size, bss_address, 545 const auto map_result{MapNro(system.ApplicationProcess(), nro_address, nro_size,
546 bss_size, nro_size + bss_size)}; 546 bss_address, bss_size, nro_size + bss_size)};
547 if (map_result.Failed()) { 547 if (map_result.Failed()) {
548 IPC::ResponseBuilder rb{ctx, 2}; 548 IPC::ResponseBuilder rb{ctx, 2};
549 rb.Push(map_result.Code()); 549 rb.Push(map_result.Code());
550 } 550 }
551 551
552 // Load the NRO into the mapped memory 552 // Load the NRO into the mapped memory
553 if (const auto result{LoadNro(system.CurrentProcess(), header, nro_address, *map_result)}; 553 if (const auto result{
554 LoadNro(system.ApplicationProcess(), header, nro_address, *map_result)};
554 result.IsError()) { 555 result.IsError()) {
555 IPC::ResponseBuilder rb{ctx, 2}; 556 IPC::ResponseBuilder rb{ctx, 2};
556 rb.Push(map_result.Code()); 557 rb.Push(map_result.Code());
@@ -570,7 +571,7 @@ public:
570 571
571 Result UnmapNro(const NROInfo& info) { 572 Result UnmapNro(const NROInfo& info) {
572 // Each region must be unmapped separately to validate memory state 573 // Each region must be unmapped separately to validate memory state
573 auto& page_table{system.CurrentProcess()->PageTable()}; 574 auto& page_table{system.ApplicationProcess()->PageTable()};
574 575
575 if (info.bss_size != 0) { 576 if (info.bss_size != 0) {
576 CASCADE_CODE(page_table.UnmapCodeMemory( 577 CASCADE_CODE(page_table.UnmapCodeMemory(
@@ -641,7 +642,7 @@ public:
641 LOG_WARNING(Service_LDR, "(STUBBED) called"); 642 LOG_WARNING(Service_LDR, "(STUBBED) called");
642 643
643 initialized = true; 644 initialized = true;
644 current_map_addr = system.CurrentProcess()->PageTable().GetAliasCodeRegionStart(); 645 current_map_addr = system.ApplicationProcess()->PageTable().GetAliasCodeRegionStart();
645 646
646 IPC::ResponseBuilder rb{ctx, 2}; 647 IPC::ResponseBuilder rb{ctx, 2};
647 rb.Push(ResultSuccess); 648 rb.Push(ResultSuccess);
diff --git a/src/core/hle/service/nfp/nfp_device.cpp b/src/core/hle/service/nfp/nfp_device.cpp
index e67a76f55..7a6bbbba7 100644
--- a/src/core/hle/service/nfp/nfp_device.cpp
+++ b/src/core/hle/service/nfp/nfp_device.cpp
@@ -618,7 +618,7 @@ Result NfpDevice::RecreateApplicationArea(u32 access_id, std::span<const u8> dat
618 sizeof(ApplicationArea) - data.size()); 618 sizeof(ApplicationArea) - data.size());
619 619
620 // TODO: Investigate why the title id needs to be moddified 620 // TODO: Investigate why the title id needs to be moddified
621 tag_data.title_id = system.GetCurrentProcessProgramID(); 621 tag_data.title_id = system.GetApplicationProcessProgramID();
622 tag_data.title_id = tag_data.title_id | 0x30000000ULL; 622 tag_data.title_id = tag_data.title_id | 0x30000000ULL;
623 tag_data.settings.settings.appdata_initialized.Assign(1); 623 tag_data.settings.settings.appdata_initialized.Assign(1);
624 tag_data.application_area_id = access_id; 624 tag_data.application_area_id = access_id;
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp
index 0cdde82a7..e12025560 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp
@@ -150,9 +150,9 @@ NvResult nvhost_ctrl::IocCtrlEventWait(std::span<const u8> input, std::vector<u8
150 const auto check_failing = [&]() { 150 const auto check_failing = [&]() {
151 if (events[slot].fails > 2) { 151 if (events[slot].fails > 2) {
152 { 152 {
153 auto lk = system.StallProcesses(); 153 auto lk = system.StallApplication();
154 host1x_syncpoint_manager.WaitHost(fence_id, target_value); 154 host1x_syncpoint_manager.WaitHost(fence_id, target_value);
155 system.UnstallProcesses(); 155 system.UnstallApplication();
156 } 156 }
157 params.value.raw = target_value; 157 params.value.raw = target_value;
158 return true; 158 return true;
diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp
index 29c1e0f01..277afe0b4 100644
--- a/src/core/hle/service/nvdrv/devices/nvmap.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp
@@ -127,7 +127,7 @@ NvResult nvmap::IocAlloc(std::span<const u8> input, std::vector<u8>& output) {
127 return result; 127 return result;
128 } 128 }
129 bool is_out_io{}; 129 bool is_out_io{};
130 ASSERT(system.CurrentProcess() 130 ASSERT(system.ApplicationProcess()
131 ->PageTable() 131 ->PageTable()
132 .LockForMapDeviceAddressSpace(&is_out_io, handle_description->address, 132 .LockForMapDeviceAddressSpace(&is_out_io, handle_description->address,
133 handle_description->size, 133 handle_description->size,
@@ -254,7 +254,7 @@ NvResult nvmap::IocFree(std::span<const u8> input, std::vector<u8>& output) {
254 254
255 if (auto freeInfo{file.FreeHandle(params.handle, false)}) { 255 if (auto freeInfo{file.FreeHandle(params.handle, false)}) {
256 if (freeInfo->can_unlock) { 256 if (freeInfo->can_unlock) {
257 ASSERT(system.CurrentProcess() 257 ASSERT(system.ApplicationProcess()
258 ->PageTable() 258 ->PageTable()
259 .UnlockForDeviceAddressSpace(freeInfo->address, freeInfo->size) 259 .UnlockForDeviceAddressSpace(freeInfo->address, freeInfo->size)
260 .IsSuccess()); 260 .IsSuccess());
diff --git a/src/core/hle/service/pctl/pctl_module.cpp b/src/core/hle/service/pctl/pctl_module.cpp
index 2a123b42d..083609b34 100644
--- a/src/core/hle/service/pctl/pctl_module.cpp
+++ b/src/core/hle/service/pctl/pctl_module.cpp
@@ -187,7 +187,7 @@ private:
187 187
188 // TODO(ogniK): Recovery flag initialization for pctl:r 188 // TODO(ogniK): Recovery flag initialization for pctl:r
189 189
190 const auto tid = system.GetCurrentProcessProgramID(); 190 const auto tid = system.GetApplicationProcessProgramID();
191 if (tid != 0) { 191 if (tid != 0) {
192 const FileSys::PatchManager pm{tid, system.GetFileSystemController(), 192 const FileSys::PatchManager pm{tid, system.GetFileSystemController(),
193 system.GetContentProvider()}; 193 system.GetContentProvider()};
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp
index 01040b32a..90c5f8756 100644
--- a/src/core/hle/service/prepo/prepo.cpp
+++ b/src/core/hle/service/prepo/prepo.cpp
@@ -71,7 +71,7 @@ private:
71 Type, process_id, data1.size(), data2.size()); 71 Type, process_id, data1.size(), data2.size());
72 72
73 const auto& reporter{system.GetReporter()}; 73 const auto& reporter{system.GetReporter()};
74 reporter.SavePlayReport(Type, system.GetCurrentProcessProgramID(), {data1, data2}, 74 reporter.SavePlayReport(Type, system.GetApplicationProcessProgramID(), {data1, data2},
75 process_id); 75 process_id);
76 76
77 IPC::ResponseBuilder rb{ctx, 2}; 77 IPC::ResponseBuilder rb{ctx, 2};
@@ -99,7 +99,7 @@ private:
99 Type, user_id[1], user_id[0], process_id, data1.size(), data2.size()); 99 Type, user_id[1], user_id[0], process_id, data1.size(), data2.size());
100 100
101 const auto& reporter{system.GetReporter()}; 101 const auto& reporter{system.GetReporter()};
102 reporter.SavePlayReport(Type, system.GetCurrentProcessProgramID(), {data1, data2}, 102 reporter.SavePlayReport(Type, system.GetApplicationProcessProgramID(), {data1, data2},
103 process_id, user_id); 103 process_id, user_id);
104 104
105 IPC::ResponseBuilder rb{ctx, 2}; 105 IPC::ResponseBuilder rb{ctx, 2};