diff options
author | xperia64 <xperiancedapps@gmail.com> | 2019-01-20 04:14:19 +0100 |
---|---|---|
committer | fearlessTobi <thm.frey@gmail.com> | 2019-02-05 22:40:23 +0100 |
commit | f598490b57163680b0029bcb8f0077012b962498 (patch) | |
tree | 8ea68964e1f08810f4070d0799e658172ee5bda6 | |
parent | Add file extension to screenshot filename if not provided (diff) | |
download | yuzu-f598490b57163680b0029bcb8f0077012b962498.tar yuzu-f598490b57163680b0029bcb8f0077012b962498.tar.gz yuzu-f598490b57163680b0029bcb8f0077012b962498.tar.bz2 yuzu-f598490b57163680b0029bcb8f0077012b962498.tar.lz yuzu-f598490b57163680b0029bcb8f0077012b962498.tar.xz yuzu-f598490b57163680b0029bcb8f0077012b962498.tar.zst yuzu-f598490b57163680b0029bcb8f0077012b962498.zip |
-rw-r--r-- | src/yuzu/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 3a105dc4f..485e29de2 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1686,12 +1686,12 @@ void GMainWindow::OnCaptureScreenshot() { tr("PNG Image (*.png)")); png_dialog.setAcceptMode(QFileDialog::AcceptSave); png_dialog.setDefaultSuffix("png"); - png_dialog.exec(); - - const QString path = png_dialog.selectedFiles().first(); - if (!path.isEmpty()) { - UISettings::values.screenshot_path = QFileInfo(path).path(); - render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor, path); + if (png_dialog.exec()) { + const QString path = png_dialog.selectedFiles().first(); + if (!path.isEmpty()) { + UISettings::values.screenshot_path = QFileInfo(path).path(); + render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor, path); + } } OnStartGame(); } |