mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-29 23:32:23 +00:00
erpt: save 8KB
This commit is contained in:
parent
e7ca22abd7
commit
afccc35e79
1 changed files with 13 additions and 1 deletions
|
@ -73,7 +73,19 @@ namespace ams::erpt::srv {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsProductionMode() {
|
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;
|
return s_is_prod_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue