diff options
| author | 2023-02-13 11:21:43 -0500 | |
|---|---|---|
| committer | 2023-02-13 19:03:12 -0500 | |
| commit | ceda2d280e8a3030c1e23083c5cea9158387fe4c (patch) | |
| tree | 8041460840ed81d4cb74d87eecfb8fb720cdfa15 /src/core/hle/service/ldr | |
| parent | kernel: use GetCurrentProcess (diff) | |
| download | yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.gz yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.xz yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.zip | |
general: rename CurrentProcess to ApplicationProcess
Diffstat (limited to 'src/core/hle/service/ldr')
| -rw-r--r-- | src/core/hle/service/ldr/ldr.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
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); |