core: Move process creation out of global state.
This commit is contained in:
parent
8538e0bc3d
commit
7d6653268f
22 changed files with 87 additions and 72 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "common/file_util.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/swap.h"
|
||||
#include "core/core.h"
|
||||
#include "core/hle/kernel/process.h"
|
||||
#include "core/hle/kernel/resource_limit.h"
|
||||
#include "core/loader/nro.h"
|
||||
|
@ -112,7 +113,7 @@ bool AppLoader_NRO::LoadNro(const std::string& path, VAddr load_base) {
|
|||
// Load codeset for current process
|
||||
codeset->name = path;
|
||||
codeset->memory = std::make_shared<std::vector<u8>>(std::move(program_image));
|
||||
Kernel::g_current_process->LoadModule(codeset, load_base);
|
||||
Core::CurrentProcess()->LoadModule(codeset, load_base);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -125,8 +126,6 @@ ResultStatus AppLoader_NRO::Load(Kernel::SharedPtr<Kernel::Process>& process) {
|
|||
return ResultStatus::Error;
|
||||
}
|
||||
|
||||
process = Kernel::Process::Create("main", 0);
|
||||
|
||||
// Load NRO
|
||||
static constexpr VAddr base_addr{Memory::PROCESS_IMAGE_VADDR};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue