libstrat: namespace hossynch.hpp

This commit is contained in:
Michael Scire
2019-09-24 03:15:36 -07:00
committed by SciresM
parent 73d904036d
commit bb223eb5ae
57 changed files with 923 additions and 773 deletions

View File

@@ -33,7 +33,7 @@ namespace sts::cfg {
constexpr size_t NumRequiredServicesForSdCardAccess = util::size(RequiredServicesForSdCardAccess);
/* SD card globals. */
HosMutex g_sd_card_lock;
os::Mutex g_sd_card_lock;
bool g_sd_card_initialized = false;
FsFileSystem g_sd_card_filesystem = {};
@@ -64,7 +64,7 @@ namespace sts::cfg {
/* SD card utilities. */
bool IsSdCardInitialized() {
std::scoped_lock<HosMutex> lk(g_sd_card_lock);
std::scoped_lock lk(g_sd_card_lock);
if (!g_sd_card_initialized) {
if (R_SUCCEEDED(TryInitializeSdCard())) {
@@ -75,7 +75,7 @@ namespace sts::cfg {
}
void WaitSdCardInitialized() {
std::scoped_lock<HosMutex> lk(g_sd_card_lock);
std::scoped_lock lk(g_sd_card_lock);
InitializeSdCard();
}