rollback on fail

This commit is contained in:
Vaxry 2024-07-04 23:15:05 +02:00
parent e5854f8514
commit c1adf83484

View file

@ -1421,6 +1421,9 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_VSYNC); Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_VSYNC);
if (!pMonitor->state.commit()) { if (!pMonitor->state.commit()) {
// rollback the buffer to avoid writing to the front buffer that is being
// displayed
pMonitor->output->swapchain->rollback();
pMonitor->damage.damageEntire(); pMonitor->damage.damageEntire();
return; return;
} }