summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-04-09 21:27:44 +0200
committerLioncash <mathew1800@gmail.com>2019-04-12 04:11:40 +0200
commita4b0a8559c9d137682e1b77332a42841c9e640bd (patch)
tree86091344830176ec100212ca90d956cced8611b3
parentvideo_core/gpu: Create threads separately from initialization (diff)
downloadyuzu-a4b0a8559c9d137682e1b77332a42841c9e640bd.tar
yuzu-a4b0a8559c9d137682e1b77332a42841c9e640bd.tar.gz
yuzu-a4b0a8559c9d137682e1b77332a42841c9e640bd.tar.bz2
yuzu-a4b0a8559c9d137682e1b77332a42841c9e640bd.tar.lz
yuzu-a4b0a8559c9d137682e1b77332a42841c9e640bd.tar.xz
yuzu-a4b0a8559c9d137682e1b77332a42841c9e640bd.tar.zst
yuzu-a4b0a8559c9d137682e1b77332a42841c9e640bd.zip
-rw-r--r--src/core/core.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index eb300eef7..265ac2835 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -117,9 +117,6 @@ struct System::Impl {
if (web_browser == nullptr)
web_browser = std::make_unique<Core::Frontend::DefaultWebBrowserApplet>();
- auto main_process = Kernel::Process::Create(system, "main");
- kernel.MakeCurrentProcess(main_process.get());
-
telemetry_session = std::make_unique<Core::TelemetrySession>();
service_manager = std::make_shared<Service::SM::ServiceManager>();
@@ -170,7 +167,8 @@ struct System::Impl {
return init_result;
}
- const Loader::ResultStatus load_result{app_loader->Load(*kernel.CurrentProcess())};
+ auto main_process = Kernel::Process::Create(system, "main");
+ const Loader::ResultStatus load_result{app_loader->Load(*main_process)};
if (load_result != Loader::ResultStatus::Success) {
LOG_CRITICAL(Core, "Failed to load ROM (Error {})!", static_cast<int>(load_result));
Shutdown();
@@ -178,6 +176,7 @@ struct System::Impl {
return static_cast<ResultStatus>(static_cast<u32>(ResultStatus::ErrorLoader) +
static_cast<u32>(load_result));
}
+ kernel.MakeCurrentProcess(main_process.get());
// Main process has been loaded and been made current.
// Begin GPU and CPU execution.