diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-20 21:01:07 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-07-20 21:01:07 +0200 |
| commit | f864b15427b363443e767eb5e78f5dc9603c49f3 (patch) | |
| tree | b9cbc81e11885bacda0ab40db4459572f1f681e4 /src | |
| parent | 61dc0909ae72c79acc639b001813b4d9ed2e35ab (diff) | |
background: add option to force hypr chan
Diffstat (limited to 'src')
| -rw-r--r-- | src/config/ConfigManager.cpp | 1 | ||||
| -rw-r--r-- | src/render/OpenGL.cpp | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index d5172020..14cbf28b 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -85,6 +85,7 @@ void CConfigManager::setDefaultVars() { configValues["misc:disable_hyprland_logo"].intValue = 0; configValues["misc:disable_splash_rendering"].intValue = 0; + configValues["misc:force_hypr_chan"].intValue = 0; configValues["misc:vfr"].intValue = 1; configValues["misc:vrr"].intValue = 0; configValues["misc:mouse_move_enables_dpms"].intValue = 0; diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index fe028f08..5b75a865 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -1542,13 +1542,14 @@ 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 PNOSPLASH = &g_pConfigManager->getConfigValuePtr("misc:disable_splash_rendering")->intValue; + static auto* const PFORCEHYPRCHAN = &g_pConfigManager->getConfigValuePtr("misc:force_hypr_chan")->intValue; std::random_device dev; std::mt19937 engine(dev()); std::uniform_int_distribution<> distribution(0, 10); - const bool USEANIME = distribution(engine) % 2 == 0; // about 50% I think + const bool USEANIME = *PFORCEHYPRCHAN || distribution(engine) % 2 == 0; // about 50% I think // release the last tex if exists const auto PTEX = &m_mMonitorBGTextures[pMonitor]; |
