screencopy: fix ~dtor being in monitorRenderResources map

This commit is contained in:
Vaxry 2024-02-15 02:01:40 +00:00
parent e5ac970d6e
commit a42b984f51
2 changed files with 2 additions and 2 deletions

View file

@ -213,7 +213,7 @@ void CScreencopyProtocolManager::captureOutput(wl_client* client, wl_resource* r
g_pHyprRenderer->makeEGLCurrent(); g_pHyprRenderer->makeEGLCurrent();
if (g_pHyprOpenGL->m_mMonitorRenderResources.contains(PFRAME->pMonitor)) { if (g_pHyprOpenGL->m_mMonitorRenderResources.contains(PFRAME->pMonitor)) {
const auto RDATA = g_pHyprOpenGL->m_mMonitorRenderResources.at(PFRAME->pMonitor); const auto& RDATA = g_pHyprOpenGL->m_mMonitorRenderResources.at(PFRAME->pMonitor);
// bind the fb for its format. Suppress gl errors. // bind the fb for its format. Suppress gl errors.
#ifndef GLES2 #ifndef GLES2
glBindFramebuffer(GL_READ_FRAMEBUFFER, RDATA.offloadFB.m_iFb); glBindFramebuffer(GL_READ_FRAMEBUFFER, RDATA.offloadFB.m_iFb);

View file

@ -180,7 +180,7 @@ void CToplevelExportProtocolManager::captureToplevel(wl_client* client, wl_resou
g_pHyprRenderer->makeEGLCurrent(); g_pHyprRenderer->makeEGLCurrent();
if (g_pHyprOpenGL->m_mMonitorRenderResources.contains(PMONITOR)) { if (g_pHyprOpenGL->m_mMonitorRenderResources.contains(PMONITOR)) {
const auto RDATA = g_pHyprOpenGL->m_mMonitorRenderResources.at(PMONITOR); const auto& RDATA = g_pHyprOpenGL->m_mMonitorRenderResources.at(PMONITOR);
// bind the fb for its format. Suppress gl errors. // bind the fb for its format. Suppress gl errors.
#ifndef GLES2 #ifndef GLES2
glBindFramebuffer(GL_READ_FRAMEBUFFER, RDATA.offloadFB.m_iFb); glBindFramebuffer(GL_READ_FRAMEBUFFER, RDATA.offloadFB.m_iFb);