diff options
author | bunnei <bunneidev@gmail.com> | 2015-05-09 03:20:37 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-05-09 03:20:37 +0200 |
commit | 917ac23dfcab37c65e11e3413e397863bd4bc000 (patch) | |
tree | 956ca5d1a4aad3383c4a3bfc9103476abe3f1987 /src/core/loader/3dsx.cpp | |
parent | Merge pull request #728 from lioncash/vars (diff) | |
parent | Kernel: Remove unused g_main_thread variable (diff) | |
download | yuzu-917ac23dfcab37c65e11e3413e397863bd4bc000.tar yuzu-917ac23dfcab37c65e11e3413e397863bd4bc000.tar.gz yuzu-917ac23dfcab37c65e11e3413e397863bd4bc000.tar.bz2 yuzu-917ac23dfcab37c65e11e3413e397863bd4bc000.tar.lz yuzu-917ac23dfcab37c65e11e3413e397863bd4bc000.tar.xz yuzu-917ac23dfcab37c65e11e3413e397863bd4bc000.tar.zst yuzu-917ac23dfcab37c65e11e3413e397863bd4bc000.zip |
Diffstat (limited to 'src/core/loader/3dsx.cpp')
-rw-r--r-- | src/core/loader/3dsx.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/loader/3dsx.cpp b/src/core/loader/3dsx.cpp index 5d806c5d0..15527c5a6 100644 --- a/src/core/loader/3dsx.cpp +++ b/src/core/loader/3dsx.cpp @@ -8,9 +8,10 @@ #include "common/logging/log.h" #include "core/file_sys/archive_romfs.h" +#include "core/hle/kernel/process.h" +#include "core/hle/service/fs/archive.h" #include "core/loader/elf.h" #include "core/loader/ncch.h" -#include "core/hle/service/fs/archive.h" #include "core/mem_map.h" #include "3dsx.h" @@ -229,8 +230,13 @@ ResultStatus AppLoader_THREEDSX::Load() { if (!file->IsOpen()) return ResultStatus::Error; - Load3DSXFile(*file, 0x00100000); - Kernel::LoadExec(0x00100000); + Kernel::g_current_process = Kernel::Process::Create(filename, 0); + Kernel::g_current_process->svc_access_mask.set(); + Kernel::g_current_process->address_mappings = default_address_mappings; + + Load3DSXFile(*file, Memory::EXEFS_CODE_VADDR); + + Kernel::g_current_process->Run(Memory::EXEFS_CODE_VADDR, 48, Kernel::DEFAULT_STACK_SIZE); is_loaded = true; return ResultStatus::Success; |