main: Don't use as many string copies
Co-Authored-By: LC <lioncash@users.noreply.github.com>
This commit is contained in:
parent
a723ed31fd
commit
599b7c26a9
|
@ -2155,12 +2155,14 @@ void GMainWindow::OnCaptureScreenshot() {
|
||||||
OnPauseGame();
|
OnPauseGame();
|
||||||
|
|
||||||
const u64 title_id = Core::System::GetInstance().CurrentProcess()->GetTitleID();
|
const u64 title_id = Core::System::GetInstance().CurrentProcess()->GetTitleID();
|
||||||
const auto screenshot_path = FileUtil::GetUserPath(FileUtil::UserPath::ScreenshotsDir);
|
const auto screenshot_path =
|
||||||
const auto date = QDateTime::currentDateTime()
|
QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::ScreenshotsDir));
|
||||||
.toString(QStringLiteral("yyyy-MM-dd_hh-mm-ss-zzz"))
|
const auto date =
|
||||||
.toStdString();
|
QDateTime::currentDateTime().toString(QStringLiteral("yyyy-MM-dd_hh-mm-ss-zzz"));
|
||||||
QString filename = QString::fromStdString(screenshot_path + fmt::format("{:016X}", title_id) +
|
QString filename = QStringLiteral("%1%2_%3.png")
|
||||||
"_" + date + ".png");
|
.arg(screenshot_path)
|
||||||
|
.arg(title_id, 16, 16, QLatin1Char{'0'})
|
||||||
|
.arg(date);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (UISettings::values.enable_screenshot_save_as) {
|
if (UISettings::values.enable_screenshot_save_as) {
|
||||||
|
|
Loading…
Reference in a new issue