diff options
Diffstat (limited to 'src/core/hle/service')
21 files changed, 59 insertions, 55 deletions
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_) | |||
| 79 | IWindowController::~IWindowController() = default; | 79 | IWindowController::~IWindowController() = default; |
| 80 | 80 | ||
| 81 | void IWindowController::GetAppletResourceUserId(Kernel::HLERequestContext& ctx) { | 81 | void 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: | |||
| 554 | void Module::Interface::CreateDeliveryCacheStorageService(Kernel::HLERequestContext& ctx) { | 554 | void 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 | ||
| 65 | static void GenerateErrorReport(Core::System& system, Result error_code, const FatalInfo& info) { | 65 | static 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 | ||
| 323 | ResultVal<FileSys::VirtualFile> FileSystemController::OpenPatchedRomFS( | 323 | ResultVal<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}; |