mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-29 06:22:39 +02:00
erpt: save 8KB
This commit is contained in:
parent
2905319d46
commit
c3583b8604
@ -73,7 +73,19 @@ namespace ams::erpt::srv {
|
||||
}
|
||||
|
||||
bool IsProductionMode() {
|
||||
static bool s_is_prod_mode = IsProductionModeImpl();
|
||||
static constinit bool s_initialized = false;
|
||||
static constinit bool s_is_prod_mode = true;
|
||||
static constinit os::SdkMutex s_mutex;
|
||||
|
||||
if (AMS_UNLIKELY(!s_initialized)) {
|
||||
std::scoped_lock lk(s_mutex);
|
||||
|
||||
if (AMS_LIKELY(!s_initialized)) {
|
||||
s_is_prod_mode = IsProductionModeImpl();
|
||||
s_initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
return s_is_prod_mode;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user