mirror of
https://github.com/hyprwm/Hyprland
synced 2025-02-18 12:22:09 +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:use_nearest_neighbor"].intValue = 1;
|
||||||
configValues["xwayland:force_zero_scaling"].intValue = 0;
|
configValues["xwayland:force_zero_scaling"].intValue = 0;
|
||||||
|
|
||||||
|
configValues["opengl:nvidia_anti_flicker"].intValue = 1;
|
||||||
|
|
||||||
configValues["autogenerated"].intValue = 0;
|
configValues["autogenerated"].intValue = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2419,7 +2419,8 @@ bool CHyprRenderer::beginRender(CMonitor* pMonitor, CRegion& damage, eRenderMode
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHyprRenderer::endRender() {
|
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)
|
if (m_eRenderMode != RENDER_MODE_TO_BUFFER_READ_ONLY)
|
||||||
g_pHyprOpenGL->end();
|
g_pHyprOpenGL->end();
|
||||||
|
@ -2432,7 +2433,7 @@ void CHyprRenderer::endRender() {
|
||||||
if (m_eRenderMode == RENDER_MODE_FULL_FAKE)
|
if (m_eRenderMode == RENDER_MODE_FULL_FAKE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (isNvidia())
|
if (isNvidia() && *PNVIDIAANTIFLICKER)
|
||||||
glFinish();
|
glFinish();
|
||||||
else
|
else
|
||||||
glFlush();
|
glFlush();
|
||||||
|
|
Loading…
Add table
Reference in a new issue