Просмотр исходного кода

main: Fix screenshot filepath construction

The screenshot directory path returned does not have a trailing directory separator character. This caused screenshots to be saved in the parent directory of the configured screenshot directory.

This fixes that behavior
ameerj 5 лет назад
Родитель
Сommit
9dd35b7b66
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/yuzu/main.cpp

+ 1 - 1
src/yuzu/main.cpp

@@ -2823,7 +2823,7 @@ void GMainWindow::OnCaptureScreenshot() {
         QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir));
         QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir));
     const auto date =
     const auto date =
         QDateTime::currentDateTime().toString(QStringLiteral("yyyy-MM-dd_hh-mm-ss-zzz"));
         QDateTime::currentDateTime().toString(QStringLiteral("yyyy-MM-dd_hh-mm-ss-zzz"));
-    QString filename = QStringLiteral("%1%2_%3.png")
+    QString filename = QStringLiteral("%1/%2_%3.png")
                            .arg(screenshot_path)
                            .arg(screenshot_path)
                            .arg(title_id, 16, 16, QLatin1Char{'0'})
                            .arg(title_id, 16, 16, QLatin1Char{'0'})
                            .arg(date);
                            .arg(date);