From dcc0617cc2d5b0fd3ebfa42b66721bf9e575dd11 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Fri, 12 Feb 2021 17:21:44 -0500 Subject: [PATCH] yuzu: Create screenshot path before capture Allows screenshots in cases where the screenshots path doesn't already exist. --- src/yuzu/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 52218eb70..28a52a56c 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2490,6 +2490,11 @@ void GMainWindow::OnCaptureScreenshot() { .arg(title_id, 16, 16, QLatin1Char{'0'}) .arg(date); + if (!Common::FS::CreateDir(screenshot_path.toStdString())) { + OnStartGame(); + return; + } + #ifdef _WIN32 if (UISettings::values.enable_screenshot_save_as) { filename = QFileDialog::getSaveFileName(this, tr("Capture Screenshot"), filename,