summaryrefslogtreecommitdiff
path: root/src/core/loader/nro.cpp
diff options
context:
space:
mode:
authorGravatar Subv2018-02-27 10:22:15 -0500
committerGravatar Subv2018-03-01 19:03:53 -0500
commit827f8ca3c77ad0b7e667c64b5c983b3b3ffe8d7d (patch)
treee557f60eddcd74f0ab380a81dd42749b3e46ef4e /src/core/loader/nro.cpp
parentFS: Implement MountSaveData and some of the IFile interface. (diff)
downloadyuzu-827f8ca3c77ad0b7e667c64b5c983b3b3ffe8d7d.tar.gz
yuzu-827f8ca3c77ad0b7e667c64b5c983b3b3ffe8d7d.tar.xz
yuzu-827f8ca3c77ad0b7e667c64b5c983b3b3ffe8d7d.zip
Kernel: Store the program id in the Process class instead of the CodeSet class.
There may be many CodeSets per Process, so it's wasteful and overcomplicated to store the program id in each of them.
Diffstat (limited to 'src/core/loader/nro.cpp')
-rw-r--r--src/core/loader/nro.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp
index 6f8a2f21e..c557b66dc 100644
--- a/src/core/loader/nro.cpp
+++ b/src/core/loader/nro.cpp
@@ -83,7 +83,7 @@ bool AppLoader_NRO::LoadNro(const std::string& path, VAddr load_base) {
83 } 83 }
84 84
85 // Build program image 85 // Build program image
86 Kernel::SharedPtr<Kernel::CodeSet> codeset = Kernel::CodeSet::Create("", 0); 86 Kernel::SharedPtr<Kernel::CodeSet> codeset = Kernel::CodeSet::Create("");
87 std::vector<u8> program_image; 87 std::vector<u8> program_image;
88 program_image.resize(PageAlignSize(nro_header.file_size)); 88 program_image.resize(PageAlignSize(nro_header.file_size));
89 file.Seek(0, SEEK_SET); 89 file.Seek(0, SEEK_SET);
@@ -125,7 +125,7 @@ ResultStatus AppLoader_NRO::Load(Kernel::SharedPtr<Kernel::Process>& process) {
125 return ResultStatus::Error; 125 return ResultStatus::Error;
126 } 126 }
127 127
128 process = Kernel::Process::Create("main"); 128 process = Kernel::Process::Create("main", 0);
129 129
130 // Load NRO 130 // Load NRO
131 static constexpr VAddr base_addr{Memory::PROCESS_IMAGE_VADDR}; 131 static constexpr VAddr base_addr{Memory::PROCESS_IMAGE_VADDR};