summaryrefslogtreecommitdiff
path: root/src/yuzu/bootmanager.cpp
diff options
context:
space:
mode:
authorMai M <mathew1800@gmail.com>2022-04-21 04:20:57 -0400
committerGitHub <noreply@github.com>2022-04-21 04:20:57 -0400
commitb0878863050f0bcfc23684cc3a58e8ecdb581854 (patch)
treef85fe3b6853d742ef6c947e2b09f9b2a8569f82e /src/yuzu/bootmanager.cpp
parentfd409a92473726600a6605d5cfb782c38c3de72d (diff)
parent3e77466b8627a55f2c83e9c7223df1d32b30cd3f (diff)
Merge pull request #8192 from german77/screenshot
bootmanager: Don't create another screenshot request if previous one is not done yet
Diffstat (limited to 'src/yuzu/bootmanager.cpp')
-rw-r--r--src/yuzu/bootmanager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 27b0300d2..a1b819ae0 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -933,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(