aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMihai Fufezan <[email protected]>2023-09-17 17:26:24 +0300
committerGitHub <[email protected]>2023-09-17 15:26:24 +0100
commitf72e04d63bce38fa72497e968246aa303e5e22ba (patch)
tree190dc7469f6a5b59a26ac09d78a8ebe33ada8c41
parentc8cc811e85eec16932f59fdf3783e9a6195f20f8 (diff)
downloadHyprland-f72e04d63bce38fa72497e968246aa303e5e22ba.tar.gz
Hyprland-f72e04d63bce38fa72497e968246aa303e5e22ba.zip
misc: add disable_hypr_chan option (#3343)
-rw-r--r--src/config/ConfigManager.cpp1
-rw-r--r--src/render/OpenGL.cpp10
2 files changed, 8 insertions, 3 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 7893cefa..a487734d 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -86,6 +86,7 @@ void CConfigManager::setDefaultVars() {
configValues["misc:disable_hyprland_logo"].intValue = 0;
configValues["misc:disable_splash_rendering"].intValue = 0;
+ configValues["misc:disable_hypr_chan"].intValue = 0;
configValues["misc:force_hypr_chan"].intValue = 0;
configValues["misc:vfr"].intValue = 1;
configValues["misc:vrr"].intValue = 0;
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 4ab8f3a8..f5a39ca7 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -1775,8 +1775,9 @@ void CHyprOpenGLImpl::renderSplash(cairo_t* const CAIRO, cairo_surface_t* const
void CHyprOpenGLImpl::createBGTextureForMonitor(CMonitor* pMonitor) {
RASSERT(m_RenderData.pMonitor, "Tried to createBGTex without begin()!");
- static auto* const PNOSPLASH = &g_pConfigManager->getConfigValuePtr("misc:disable_splash_rendering")->intValue;
- static auto* const PFORCEHYPRCHAN = &g_pConfigManager->getConfigValuePtr("misc:force_hypr_chan")->intValue;
+ static auto* const PNOSPLASH = &g_pConfigManager->getConfigValuePtr("misc:disable_splash_rendering")->intValue;
+ static auto* const PDISABLEHYPRCHAN = &g_pConfigManager->getConfigValuePtr("misc:disable_hypr_chan")->intValue;
+ static auto* const PFORCEHYPRCHAN = &g_pConfigManager->getConfigValuePtr("misc:force_hypr_chan")->intValue;
std::random_device dev;
std::mt19937 engine(dev());
@@ -1797,7 +1798,10 @@ void CHyprOpenGLImpl::createBGTextureForMonitor(CMonitor* pMonitor) {
// or configure the paths at build time
// get the adequate tex
- std::string texPath = "/usr/share/hyprland/wall_" + std::string(USEANIME ? (distribution2(engine) == 0 ? "anime_" : "anime2_") : "");
+ std::string texPath = "/usr/share/hyprland/wall_";
+ if (!*PDISABLEHYPRCHAN)
+ texPath += std::string(USEANIME ? (distribution2(engine) == 0 ? "anime_" : "anime2_") : "");
+
// check if wallpapers exist
Vector2D textureSize;