mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-02 15:49:48 -04:00
ams: revamp assertion system
This commit is contained in:
parent
9572fb2ce3
commit
40400aee1f
168 changed files with 1014 additions and 696 deletions
|
@ -49,20 +49,20 @@ namespace ams::cfg {
|
|||
|
||||
void WaitSdCardServicesReadyImpl() {
|
||||
for (size_t i = 0; i < NumRequiredServicesForSdCardAccess; i++) {
|
||||
R_ASSERT(sm::WaitService(RequiredServicesForSdCardAccess[i]));
|
||||
R_ABORT_UNLESS(sm::WaitService(RequiredServicesForSdCardAccess[i]));
|
||||
}
|
||||
}
|
||||
|
||||
Result TryInitializeSdCard() {
|
||||
R_TRY(CheckSdCardServicesReady());
|
||||
R_ASSERT(fsOpenSdCardFileSystem(&g_sd_card_filesystem));
|
||||
R_ABORT_UNLESS(fsOpenSdCardFileSystem(&g_sd_card_filesystem));
|
||||
g_sd_card_initialized = true;
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
void InitializeSdCard() {
|
||||
WaitSdCardServicesReadyImpl();
|
||||
R_ASSERT(fsOpenSdCardFileSystem(&g_sd_card_filesystem));
|
||||
R_ABORT_UNLESS(fsOpenSdCardFileSystem(&g_sd_card_filesystem));
|
||||
g_sd_card_initialized = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue