mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 16:45:59 +01:00
parent
f86cdcf8d5
commit
2702814a3f
2 changed files with 5 additions and 2 deletions
|
@ -281,6 +281,8 @@ void CConfigManager::setDefaultVars() {
|
|||
configValues["xwayland:use_nearest_neighbor"].intValue = 1;
|
||||
configValues["xwayland:force_zero_scaling"].intValue = 0;
|
||||
|
||||
configValues["opengl:nvidia_anti_flicker"].intValue = 1;
|
||||
|
||||
configValues["autogenerated"].intValue = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2419,7 +2419,8 @@ bool CHyprRenderer::beginRender(CMonitor* pMonitor, CRegion& damage, eRenderMode
|
|||
}
|
||||
|
||||
void CHyprRenderer::endRender() {
|
||||
const auto PMONITOR = g_pHyprOpenGL->m_RenderData.pMonitor;
|
||||
const auto PMONITOR = g_pHyprOpenGL->m_RenderData.pMonitor;
|
||||
static auto* const PNVIDIAANTIFLICKER = &g_pConfigManager->getConfigValuePtr("opengl:nvidia_anti_flicker")->intValue;
|
||||
|
||||
if (m_eRenderMode != RENDER_MODE_TO_BUFFER_READ_ONLY)
|
||||
g_pHyprOpenGL->end();
|
||||
|
@ -2432,7 +2433,7 @@ void CHyprRenderer::endRender() {
|
|||
if (m_eRenderMode == RENDER_MODE_FULL_FAKE)
|
||||
return;
|
||||
|
||||
if (isNvidia())
|
||||
if (isNvidia() && *PNVIDIAANTIFLICKER)
|
||||
glFinish();
|
||||
else
|
||||
glFlush();
|
||||
|
|
Loading…
Reference in a new issue