env: add HYPRLAND_NO_RT

This commit is contained in:
Vaxry 2023-11-17 23:29:30 +00:00
parent a903dba858
commit 483302a2cd
2 changed files with 6 additions and 1 deletions

View file

@ -708,6 +708,10 @@ int64_t configStringToInt(const std::string& VALUE) {
} else if (VALUE.starts_with("false") || VALUE.starts_with("off") || VALUE.starts_with("no")) {
return 0;
}
if (VALUE.empty() || !isNumber(VALUE))
return 0;
return std::stoll(VALUE);
}

View file

@ -97,7 +97,8 @@ int main(int argc, char** argv) {
g_pCompositor->initServer();
Init::gainRealTime();
if (!getenv("HYPRLAND_NO_RT") || configStringToInt(std::string(getenv("HYPRLAND_NO_RT"))) == 0)
Init::gainRealTime();
Debug::log(LOG, "Hyprland init finished.");