From cdda8593d8a2a5b619fcba0e8455a445c873c20a Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 6 Dec 2022 14:03:21 +0200 Subject: [PATCH] backends/virtual: Fix KWIN_WAYLAND_VIRTUAL_SCREENSHOTS Image path is incorrectly specified in the EGL backend. Also, `%s` must be `%2`. --- src/backends/virtual/virtual_egl_backend.cpp | 2 +- src/backends/virtual/virtual_qpainter_backend.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backends/virtual/virtual_egl_backend.cpp b/src/backends/virtual/virtual_egl_backend.cpp index 1af06e9d62..24ba6707bc 100644 --- a/src/backends/virtual/virtual_egl_backend.cpp +++ b/src/backends/virtual/virtual_egl_backend.cpp @@ -206,7 +206,7 @@ void VirtualEglBackend::present(Output *output) if (m_backend->saveFrames()) { const std::unique_ptr &layer = m_outputs[output]; - layer->texture()->toImage().save(QStringLiteral("%1/%2.png").arg(m_backend->saveFrames()).arg(QString::number(m_frameCounter++))); + layer->texture()->toImage().save(QStringLiteral("%1/%2-%3.png").arg(m_backend->screenshotDirPath(), output->name(), QString::number(m_frameCounter++))); } } diff --git a/src/backends/virtual/virtual_qpainter_backend.cpp b/src/backends/virtual/virtual_qpainter_backend.cpp index 9304c80275..0be6550b86 100644 --- a/src/backends/virtual/virtual_qpainter_backend.cpp +++ b/src/backends/virtual/virtual_qpainter_backend.cpp @@ -71,7 +71,7 @@ void VirtualQPainterBackend::present(Output *output) static_cast(output)->vsyncMonitor()->arm(); if (m_backend->saveFrames()) { - m_outputs[output]->image()->save(QStringLiteral("%1/%s-%3.png").arg(m_backend->screenshotDirPath(), output->name(), QString::number(m_frameCounter++))); + m_outputs[output]->image()->save(QStringLiteral("%1/%2-%3.png").arg(m_backend->screenshotDirPath(), output->name(), QString::number(m_frameCounter++))); } }