VERY experimental Nintendo Switch 2 emulator
C++
main: Don't use as many string copies
lat9nq0f7e75ddb579
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cppindex c6bf5214e1..e6a1a80a33 100644--- a/src/yuzu/main.cpp+++ b/src/yuzu/main.cpp@@ -2155,12 +2155,14 @@ void GMainWindow::OnCaptureScreenshot() {OnPauseGame();const u64 title_id = Core::System::GetInstance().CurrentProcess()->GetTitleID();- const auto screenshot_path = FileUtil::GetUserPath(FileUtil::UserPath::ScreenshotsDir);- const auto date = QDateTime::currentDateTime()- .toString(QStringLiteral("yyyy-MM-dd_hh-mm-ss-zzz"))- .toStdString();- QString filename = QString::fromStdString(screenshot_path + fmt::format("{:016X}", title_id) +- "_" + date + ".png");+ const auto screenshot_path =+ QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::ScreenshotsDir));+ const auto date =+ QDateTime::currentDateTime().toString(QStringLiteral("yyyy-MM-dd_hh-mm-ss-zzz"));+ QString filename = QStringLiteral("%1%2_%3.png")+ .arg(screenshot_path)+ .arg(title_id, 16, 16, QLatin1Char{'0'})+ .arg(date);#ifdef _WIN32if (UISettings::values.enable_screenshot_save_as) {