From 285feba42bb4d60d536c02169fd30429ba02cbab Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 28 Mar 2019 15:37:50 -0700 Subject: [PATCH] fatal: Standardize result definitions --- stratosphere/fatal/source/fatal_event_manager.cpp | 2 +- stratosphere/fatal/source/fatal_repair.cpp | 4 ++-- stratosphere/fatal/source/fatal_task_screen.cpp | 2 +- stratosphere/fatal/source/fatal_throw.cpp | 2 +- stratosphere/fatal/source/fatal_types.hpp | 8 -------- stratosphere/libstratosphere | 2 +- 6 files changed, 6 insertions(+), 14 deletions(-) diff --git a/stratosphere/fatal/source/fatal_event_manager.cpp b/stratosphere/fatal/source/fatal_event_manager.cpp index 4414941ce..db941f71f 100644 --- a/stratosphere/fatal/source/fatal_event_manager.cpp +++ b/stratosphere/fatal/source/fatal_event_manager.cpp @@ -38,7 +38,7 @@ Result FatalEventManager::GetEvent(Handle *out) { /* Only allow GetEvent to succeed NumFatalEvents times. */ if (this->events_gotten >= FatalEventManager::NumFatalEvents) { - return FatalResult_TooManyEvents; + return ResultFatalTooManyEvents; } *out = this->events[this->events_gotten++].revent; diff --git a/stratosphere/fatal/source/fatal_repair.cpp b/stratosphere/fatal/source/fatal_repair.cpp index b884c1aef..fe7f6923a 100644 --- a/stratosphere/fatal/source/fatal_repair.cpp +++ b/stratosphere/fatal/source/fatal_repair.cpp @@ -97,10 +97,10 @@ static bool InRepairWithoutTimeReviserCartridge() { void CheckRepairStatus() { if (InRepairWithoutVolHeld()) { - ThrowFatalForSelf(FatalResult_InRepairWithoutVolHeld); + ThrowFatalForSelf(ResultFatalInRepairWithoutVolHeld); } if (InRepairWithoutTimeReviserCartridge()) { - ThrowFatalForSelf(FatalResult_InRepairWithoutTimeReviserCartridge); + ThrowFatalForSelf(ResultFatalInRepairWithoutTimeReviserCartridge); } } diff --git a/stratosphere/fatal/source/fatal_task_screen.cpp b/stratosphere/fatal/source/fatal_task_screen.cpp index 7b99d9b6e..b0bf4735c 100644 --- a/stratosphere/fatal/source/fatal_task_screen.cpp +++ b/stratosphere/fatal/source/fatal_task_screen.cpp @@ -186,7 +186,7 @@ Result ShowFatalTask::ShowFatal() { /* Dequeue a buffer. */ u16 *tiled_buf = reinterpret_cast(framebufferBegin(&this->fb, NULL)); if (tiled_buf == nullptr) { - return FatalResult_NullGfxBuffer; + return ResultFatalNullGraphicsBuffer; } /* Let the font manager know about our framebuffer. */ diff --git a/stratosphere/fatal/source/fatal_throw.cpp b/stratosphere/fatal/source/fatal_throw.cpp index 5cbcfa9dc..421e15921 100644 --- a/stratosphere/fatal/source/fatal_throw.cpp +++ b/stratosphere/fatal/source/fatal_throw.cpp @@ -26,7 +26,7 @@ static bool g_thrown = false; static Result SetThrown() { /* This should be fine, since fatal only has a single IPC thread. */ if (g_thrown) { - return FatalResult_AlreadyThrown; + return ResultFatalAlreadyThrown; } g_thrown = true; diff --git a/stratosphere/fatal/source/fatal_types.hpp b/stratosphere/fatal/source/fatal_types.hpp index f9ce5fb0e..61ad060bc 100644 --- a/stratosphere/fatal/source/fatal_types.hpp +++ b/stratosphere/fatal/source/fatal_types.hpp @@ -18,14 +18,6 @@ #include #include -enum FatalResult : Result { - FatalResult_NullGfxBuffer = 0x4A3, - FatalResult_AlreadyThrown = 0x6A3, - FatalResult_TooManyEvents = 0x8A3, - FatalResult_InRepairWithoutVolHeld = 0xAA3, - FatalResult_InRepairWithoutTimeReviserCartridge = 0xCA3, -}; - static constexpr size_t NumAarch64Gprs = 32; static constexpr size_t NumAarch32Gprs = 16; diff --git a/stratosphere/libstratosphere b/stratosphere/libstratosphere index aab4aedb3..d448c03c5 160000 --- a/stratosphere/libstratosphere +++ b/stratosphere/libstratosphere @@ -1 +1 @@ -Subproject commit aab4aedb34e5029101ee15c238ead6167aaa4afa +Subproject commit d448c03c5d65a413b68e504d93929ef161858dcb