diff options
author | Vaxry <[email protected]> | 2023-11-17 23:29:30 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2023-11-17 23:29:30 +0000 |
commit | 483302a2cdc3cc8f4854aecb9cb0ed841babe30c (patch) | |
tree | 85e72c057e72fbe8ba1142ddad99e65a09a35291 /src | |
parent | a903dba8581aedfbc04b168e7074e22d1c3d004f (diff) | |
download | Hyprland-483302a2cdc3cc8f4854aecb9cb0ed841babe30c.tar.gz Hyprland-483302a2cdc3cc8f4854aecb9cb0ed841babe30c.zip |
env: add HYPRLAND_NO_RT
Diffstat (limited to 'src')
-rw-r--r-- | src/helpers/MiscFunctions.cpp | 4 | ||||
-rw-r--r-- | src/main.cpp | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index 85a81657..71263748 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -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); } diff --git a/src/main.cpp b/src/main.cpp index 40ddf390..27a768ba 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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."); |