ams: use R_SUCCEED, R_THROW globally

This commit is contained in:
Michael Scire
2022-03-26 00:14:36 -07:00
parent e5b1739f65
commit dd78ede99f
370 changed files with 2107 additions and 2107 deletions

View File

@@ -32,7 +32,7 @@ namespace ams::fatal::srv {
R_UNLESS(m_num_events_gotten < FatalEventManager::NumFatalEvents, fatal::ResultTooManyEvents());
*out = std::addressof(m_events[m_num_events_gotten++]);
return ResultSuccess();
R_SUCCEED();
}
void FatalEventManager::SignalEvents() {

View File

@@ -254,7 +254,7 @@ namespace ams::fatal::srv::font {
stbtt_InitFont(std::addressof(g_stb_font), font_buffer, stbtt_GetFontOffsetForIndex(font_buffer, 0));
SetFontSize(16.0f);
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -53,7 +53,7 @@ namespace ams::fatal::srv {
R_TRY(pcvSetClockRate(module, hz));
}
return ResultSuccess();
R_SUCCEED();
}
Result AdjustClockTask::AdjustClock() {
@@ -66,7 +66,7 @@ namespace ams::fatal::srv {
R_TRY(AdjustClockForModule(PcvModule_GPU, GPU_CLOCK_307MHZ));
R_TRY(AdjustClockForModule(PcvModule_EMC, EMC_CLOCK_1331MHZ));
return ResultSuccess();
R_SUCCEED();
}
Result AdjustClockTask::Run() {

View File

@@ -165,7 +165,7 @@ namespace ams::fatal::srv {
/* Signal we're done with our job. */
m_context->erpt_event->Signal();
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -207,18 +207,18 @@ namespace ams::fatal::srv {
Result PowerControlTask::Run() {
this->MonitorBatteryState();
return ResultSuccess();
R_SUCCEED();
}
Result PowerButtonObserveTask::Run() {
this->WaitForPowerButton();
return ResultSuccess();
R_SUCCEED();
}
Result StateTransitionStopTask::Run() {
/* Nintendo ignores the output of this call... */
spsmPutErrorState();
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -125,7 +125,7 @@ namespace ams::fatal::srv {
/* Set alpha to 1.0f. */
R_TRY(viSetDisplayAlpha(std::addressof(temp_display), 1.0f));
return ResultSuccess();
R_SUCCEED();
}
Result ShowFatalTask::SetupDisplayExternal() {
@@ -141,7 +141,7 @@ namespace ams::fatal::srv {
/* Set alpha to 1.0f. */
R_TRY(viSetDisplayAlpha(std::addressof(temp_display), 1.0f));
return ResultSuccess();
R_SUCCEED();
}
Result ShowFatalTask::PrepareScreenForDrawing() {
@@ -196,7 +196,7 @@ namespace ams::fatal::srv {
R_TRY(this->InitializeNativeWindow());
}
return ResultSuccess();
R_SUCCEED();
}
void ShowFatalTask::PreRenderFrameBuffer() {
@@ -468,7 +468,7 @@ namespace ams::fatal::srv {
R_TRY(nwindowConfigureBuffer(std::addressof(m_win), 0, std::addressof(grbuf)));
}
return ResultSuccess();
R_SUCCEED();
}
void ShowFatalTask::DisplayPreRenderedFrame() {
@@ -488,7 +488,7 @@ namespace ams::fatal::srv {
/* Display the pre-rendered frame. */
this->DisplayPreRenderedFrame();
return ResultSuccess();
R_SUCCEED();
}
Result ShowFatalTask::Run() {
@@ -506,7 +506,7 @@ namespace ams::fatal::srv {
Result BacklightControlTask::Run() {
TurnOnBacklight();
return ResultSuccess();
R_SUCCEED();
}
}

View File

@@ -82,7 +82,7 @@ namespace ams::fatal::srv {
Result StopSoundTask::Run() {
StopSound();
return ResultSuccess();
R_SUCCEED();
}
}