mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-25 18:09:48 +01:00
minor fixes for wl
This commit is contained in:
parent
9ad03ed231
commit
7dee974be8
1 changed files with 5 additions and 2 deletions
|
@ -2606,10 +2606,13 @@ bool CHyprRenderer::beginRender(CMonitor* pMonitor, CRegion& damage, eRenderMode
|
||||||
static constexpr const int HL_BUFFER_AGE = 2;
|
static constexpr const int HL_BUFFER_AGE = 2;
|
||||||
|
|
||||||
if (!buffer) {
|
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();
|
Aquamarine::SSwapchainOptions opts = pMonitor->output->swapchain->currentOptions();
|
||||||
opts.length = 2;
|
opts.length = 2;
|
||||||
opts.size = pMonitor->currentMode->pixelSize;
|
opts.size = MODE->pixelSize;
|
||||||
opts.format = pMonitor->drmFormat;
|
opts.format = pMonitor->output->state->state().drmFormat;
|
||||||
if (!pMonitor->output->swapchain->reconfigure(opts)) {
|
if (!pMonitor->output->swapchain->reconfigure(opts)) {
|
||||||
Debug::log(ERR, "Failed to reconfigure swapchain for {}", pMonitor->szName);
|
Debug::log(ERR, "Failed to reconfigure swapchain for {}", pMonitor->szName);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue