From b4b12082221ed03a96425b7bf2b37e5b4e4749e5 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Tue, 5 Mar 2019 07:50:27 -0800 Subject: [PATCH] stratosphere: fix svcExitThread usage --- stratosphere/ams_mitm/source/utils.cpp | 2 -- stratosphere/fatal/source/fatal_task.cpp | 1 - stratosphere/fatal/source/fatal_task_screen.cpp | 9 +++++++++ stratosphere/libstratosphere | 2 +- stratosphere/pm/source/pm_process_track.cpp | 1 - 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/stratosphere/ams_mitm/source/utils.cpp b/stratosphere/ams_mitm/source/utils.cpp index 27ea93f49..976a82ea9 100644 --- a/stratosphere/ams_mitm/source/utils.cpp +++ b/stratosphere/ams_mitm/source/utils.cpp @@ -223,8 +223,6 @@ void Utils::InitializeThreadFunc(void *args) { hidExit(); } - - svcExitThread(); } bool Utils::IsSdInitialized() { diff --git a/stratosphere/fatal/source/fatal_task.cpp b/stratosphere/fatal/source/fatal_task.cpp index 6cf13428f..fd0f699ff 100644 --- a/stratosphere/fatal/source/fatal_task.cpp +++ b/stratosphere/fatal/source/fatal_task.cpp @@ -39,7 +39,6 @@ static void RunTaskThreadFunc(void *arg) { } /* Finish. */ - svcExitThread(); } static void RunTask(IFatalTask *task, u32 stack_size = 0x4000) { diff --git a/stratosphere/fatal/source/fatal_task_screen.cpp b/stratosphere/fatal/source/fatal_task_screen.cpp index a67cf71ce..c7b27b45b 100644 --- a/stratosphere/fatal/source/fatal_task_screen.cpp +++ b/stratosphere/fatal/source/fatal_task_screen.cpp @@ -112,6 +112,15 @@ Result ShowFatalTask::PrepareScreenForDrawing() { return rc; } + { + u64 layer_z = 0xCAFEBABE; + if (R_SUCCEEDED((rc = viGetDisplayMaximumZ(&this->display, &layer_z)))) { + FILE *f_dumb = fopen("layerz.txt", "w"); + fprintf(f_dumb, "%016lx\n", layer_z); + fclose(f_dumb); + } + } + /* Reset the display magnification to its default value. */ u32 display_width, display_height; if (R_FAILED((rc = viGetDisplayLogicalResolution(&this->display, &display_width, &display_height)))) { diff --git a/stratosphere/libstratosphere b/stratosphere/libstratosphere index 82c67a62d..0fbc0e2f4 160000 --- a/stratosphere/libstratosphere +++ b/stratosphere/libstratosphere @@ -1 +1 @@ -Subproject commit 82c67a62d69f04f656da495c696f264eea6fa63a +Subproject commit 0fbc0e2f468762de62d2b14d6495247d04e80bc3 diff --git a/stratosphere/pm/source/pm_process_track.cpp b/stratosphere/pm/source/pm_process_track.cpp index bfb2aa623..03ac3be8d 100644 --- a/stratosphere/pm/source/pm_process_track.cpp +++ b/stratosphere/pm/source/pm_process_track.cpp @@ -28,5 +28,4 @@ void ProcessTracking::MainLoop(void *arg) { process_waiter->Process(); delete process_waiter; - svcExitThread(); } \ No newline at end of file