diff options
Diffstat (limited to 'src/yuzu/bootmanager.cpp')
-rw-r--r-- | src/yuzu/bootmanager.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 114f17c06..a1b819ae0 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -6,7 +6,6 @@ #include <QApplication> #include <QHBoxLayout> -#include <QKeyEvent> #include <QMessageBox> #include <QPainter> #include <QScreen> @@ -28,7 +27,6 @@ #include "common/assert.h" #include "common/microprofile.h" #include "common/scm_rev.h" -#include "common/scope_exit.h" #include "common/settings.h" #include "core/core.h" #include "core/frontend/framebuffer_layout.h" @@ -38,7 +36,6 @@ #include "input_common/drivers/touch_screen.h" #include "input_common/main.h" #include "video_core/renderer_base.h" -#include "video_core/video_core.h" #include "yuzu/bootmanager.h" #include "yuzu/main.h" @@ -936,6 +933,12 @@ void GRenderWindow::CaptureScreenshot(const QString& screenshot_path) { auto& renderer = system.Renderer(); const f32 res_scale = Settings::values.resolution_info.up_factor; + if (renderer.IsScreenshotPending()) { + LOG_WARNING(Render, + "A screenshot is already requested or in progress, ignoring the request"); + return; + } + const Layout::FramebufferLayout layout{Layout::FrameLayoutFromResolutionScale(res_scale)}; screenshot_image = QImage(QSize(layout.width, layout.height), QImage::Format_RGB32); renderer.RequestScreenshot( |