minor fixes for wl

This commit is contained in:
Vaxry 2024-06-25 19:59:15 +02:00
parent 1b025eee44
commit 12c5de14c8

View file

@ -2603,10 +2603,13 @@ bool CHyprRenderer::beginRender(CMonitor* pMonitor, CRegion& damage, eRenderMode
static constexpr const int HL_BUFFER_AGE = 2;
if (!buffer) {
const auto& MODE = pMonitor->output->state->state().mode ? pMonitor->output->state->state().mode : pMonitor->output->state->state().customMode;
if (!MODE) // no mode??
return false;
Aquamarine::SSwapchainOptions opts = pMonitor->output->swapchain->currentOptions();
opts.length = 2;
opts.size = pMonitor->currentMode->pixelSize;
opts.format = pMonitor->drmFormat;
opts.size = MODE->pixelSize;
opts.format = pMonitor->output->state->state().drmFormat;
if (!pMonitor->output->swapchain->reconfigure(opts)) {
Debug::log(ERR, "Failed to reconfigure swapchain for {}", pMonitor->szName);
return false;