aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/bootmanager.cpp
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2022-04-10 23:12:13 -0500
committergerman77 <juangerman-13@hotmail.com>2022-04-18 01:00:48 -0500
commit3e77466b8627a55f2c83e9c7223df1d32b30cd3f (patch)
treea1b521017df901537aace3a747e028fdc3f70aab /src/yuzu/bootmanager.cpp
parent637f7e69286d4df083cc5682f74e19dcedc0d8ee (diff)
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 27b0300d2d..a1b819ae0c 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(