1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-23 10:52:13 +00:00

fatal: fix sm session usage

This commit is contained in:
Michael Scire 2019-04-24 05:18:31 -07:00
parent f6645387b0
commit 3a8f9114fc

View file

@ -95,10 +95,7 @@ Result ShowFatalTask::PrepareScreenForDrawing() {
Result rc = ResultSuccess; Result rc = ResultSuccess;
/* Connect to vi. */ /* Connect to vi. */
DoWithSmSession([&]() { if (R_FAILED((rc = viInitialize(ViServiceType_Manager)))) {
rc = viInitialize(ViServiceType_Manager);
});
if (R_FAILED(rc)) {
return rc; return rc;
} }
@ -181,7 +178,10 @@ Result ShowFatalTask::ShowFatal() {
Result rc = ResultSuccess; Result rc = ResultSuccess;
const FatalConfig *config = GetFatalConfig(); const FatalConfig *config = GetFatalConfig();
if (R_FAILED((rc = PrepareScreenForDrawing()))) { DoWithSmSession([&]() {
rc = PrepareScreenForDrawing();
});
if (R_FAILED(rc)) {
*(volatile u32 *)(0xCAFEBABE) = rc; *(volatile u32 *)(0xCAFEBABE) = rc;
return rc; return rc;
} }