summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2017-09-29 14:58:42 -0400
committerGravatar GitHub2017-09-29 14:58:42 -0400
commitb07af7dda822898e9c8f231c5ddcd1741d93dbef (patch)
treed41c9221d6065b8cf9e6a2405565b675a9c83c51 /src/core/core.cpp
parentMerge pull request #2907 from Subv/warnings3 (diff)
parentLoaders: Don't automatically set the current process every time we load an ap... (diff)
downloadyuzu-b07af7dda822898e9c8f231c5ddcd1741d93dbef.tar.gz
yuzu-b07af7dda822898e9c8f231c5ddcd1741d93dbef.tar.xz
yuzu-b07af7dda822898e9c8f231c5ddcd1741d93dbef.zip
Merge pull request #2961 from Subv/load_titles
Loaders: Don't automatically set the current process every time we load an application.
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 59b8768e7..0c7a72987 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -13,6 +13,7 @@
13#include "core/core_timing.h" 13#include "core/core_timing.h"
14#include "core/gdbstub/gdbstub.h" 14#include "core/gdbstub/gdbstub.h"
15#include "core/hle/kernel/kernel.h" 15#include "core/hle/kernel/kernel.h"
16#include "core/hle/kernel/process.h"
16#include "core/hle/kernel/thread.h" 17#include "core/hle/kernel/thread.h"
17#include "core/hle/service/service.h" 18#include "core/hle/service/service.h"
18#include "core/hw/hw.h" 19#include "core/hw/hw.h"
@@ -100,7 +101,7 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file
100 return init_result; 101 return init_result;
101 } 102 }
102 103
103 const Loader::ResultStatus load_result{app_loader->Load()}; 104 const Loader::ResultStatus load_result{app_loader->Load(Kernel::g_current_process)};
104 if (Loader::ResultStatus::Success != load_result) { 105 if (Loader::ResultStatus::Success != load_result) {
105 LOG_CRITICAL(Core, "Failed to load ROM (Error %i)!", load_result); 106 LOG_CRITICAL(Core, "Failed to load ROM (Error %i)!", load_result);
106 System::Shutdown(); 107 System::Shutdown();
@@ -114,6 +115,7 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file
114 return ResultStatus::ErrorLoader; 115 return ResultStatus::ErrorLoader;
115 } 116 }
116 } 117 }
118 Memory::SetCurrentPageTable(&Kernel::g_current_process->vm_manager.page_table);
117 status = ResultStatus::Success; 119 status = ResultStatus::Success;
118 return status; 120 return status;
119} 121}
@@ -196,4 +198,4 @@ void System::Shutdown() {
196 LOG_DEBUG(Core, "Shutdown OK"); 198 LOG_DEBUG(Core, "Shutdown OK");
197} 199}
198 200
199} // namespace 201} // namespace Core