summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core.cpp')
-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 {
117 if (web_browser == nullptr) 117 if (web_browser == nullptr)
118 web_browser = std::make_unique<Core::Frontend::DefaultWebBrowserApplet>(); 118 web_browser = std::make_unique<Core::Frontend::DefaultWebBrowserApplet>();
119 119
120 auto main_process = Kernel::Process::Create(system, "main");
121 kernel.MakeCurrentProcess(main_process.get());
122
123 telemetry_session = std::make_unique<Core::TelemetrySession>(); 120 telemetry_session = std::make_unique<Core::TelemetrySession>();
124 service_manager = std::make_shared<Service::SM::ServiceManager>(); 121 service_manager = std::make_shared<Service::SM::ServiceManager>();
125 122
@@ -170,7 +167,8 @@ struct System::Impl {
170 return init_result; 167 return init_result;
171 } 168 }
172 169
173 const Loader::ResultStatus load_result{app_loader->Load(*kernel.CurrentProcess())}; 170 auto main_process = Kernel::Process::Create(system, "main");
171 const Loader::ResultStatus load_result{app_loader->Load(*main_process)};
174 if (load_result != Loader::ResultStatus::Success) { 172 if (load_result != Loader::ResultStatus::Success) {
175 LOG_CRITICAL(Core, "Failed to load ROM (Error {})!", static_cast<int>(load_result)); 173 LOG_CRITICAL(Core, "Failed to load ROM (Error {})!", static_cast<int>(load_result));
176 Shutdown(); 174 Shutdown();
@@ -178,6 +176,7 @@ struct System::Impl {
178 return static_cast<ResultStatus>(static_cast<u32>(ResultStatus::ErrorLoader) + 176 return static_cast<ResultStatus>(static_cast<u32>(ResultStatus::ErrorLoader) +
179 static_cast<u32>(load_result)); 177 static_cast<u32>(load_result));
180 } 178 }
179 kernel.MakeCurrentProcess(main_process.get());
181 180
182 // Main process has been loaded and been made current. 181 // Main process has been loaded and been made current.
183 // Begin GPU and CPU execution. 182 // Begin GPU and CPU execution.