diff options
| author | 2018-03-14 19:33:27 -0400 | |
|---|---|---|
| committer | 2018-03-14 19:33:27 -0400 | |
| commit | cde9386e0fd9677e1a89a8dc81ea9cd65fa22c50 (patch) | |
| tree | 6330442e1dacc0d850ce09c35dcee7ddd3a2bc9d /src/core/loader/nso.cpp | |
| parent | Merge pull request #213 from Hexagon12/dynarmic-default (diff) | |
| parent | core: Move process creation out of global state. (diff) | |
| download | yuzu-cde9386e0fd9677e1a89a8dc81ea9cd65fa22c50.tar.gz yuzu-cde9386e0fd9677e1a89a8dc81ea9cd65fa22c50.tar.xz yuzu-cde9386e0fd9677e1a89a8dc81ea9cd65fa22c50.zip | |
Merge pull request #236 from bunnei/refactor-process-creation
core: Move process creation out of global state.
Diffstat (limited to 'src/core/loader/nso.cpp')
| -rw-r--r-- | src/core/loader/nso.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index 00b5d1d49..c0eeb95d3 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "common/file_util.h" | 9 | #include "common/file_util.h" |
| 10 | #include "common/logging/log.h" | 10 | #include "common/logging/log.h" |
| 11 | #include "common/swap.h" | 11 | #include "common/swap.h" |
| 12 | #include "core/core.h" | ||
| 12 | #include "core/hle/kernel/process.h" | 13 | #include "core/hle/kernel/process.h" |
| 13 | #include "core/hle/kernel/resource_limit.h" | 14 | #include "core/hle/kernel/resource_limit.h" |
| 14 | #include "core/loader/nso.h" | 15 | #include "core/loader/nso.h" |
| @@ -142,7 +143,7 @@ VAddr AppLoader_NSO::LoadModule(const std::string& path, VAddr load_base) { | |||
| 142 | // Load codeset for current process | 143 | // Load codeset for current process |
| 143 | codeset->name = path; | 144 | codeset->name = path; |
| 144 | codeset->memory = std::make_shared<std::vector<u8>>(std::move(program_image)); | 145 | codeset->memory = std::make_shared<std::vector<u8>>(std::move(program_image)); |
| 145 | Kernel::g_current_process->LoadModule(codeset, load_base); | 146 | Core::CurrentProcess()->LoadModule(codeset, load_base); |
| 146 | 147 | ||
| 147 | return load_base + image_size; | 148 | return load_base + image_size; |
| 148 | } | 149 | } |
| @@ -155,8 +156,6 @@ ResultStatus AppLoader_NSO::Load(Kernel::SharedPtr<Kernel::Process>& process) { | |||
| 155 | return ResultStatus::Error; | 156 | return ResultStatus::Error; |
| 156 | } | 157 | } |
| 157 | 158 | ||
| 158 | process = Kernel::Process::Create("main", 0); | ||
| 159 | |||
| 160 | // Load module | 159 | // Load module |
| 161 | LoadModule(filepath, Memory::PROCESS_IMAGE_VADDR); | 160 | LoadModule(filepath, Memory::PROCESS_IMAGE_VADDR); |
| 162 | LOG_DEBUG(Loader, "loaded module %s @ 0x%" PRIx64, filepath.c_str(), | 161 | LOG_DEBUG(Loader, "loaded module %s @ 0x%" PRIx64, filepath.c_str(), |