mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-09 04:10:05 +00:00
Fix formatting
This commit is contained in:
parent
72f53754b1
commit
70cb52d98f
1 changed files with 16 additions and 9 deletions
|
@ -2412,10 +2412,14 @@ void GMainWindow::OnCaptureScreenshot() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (emu_thread->IsRunning()
|
const bool was_running = emu_thread->IsRunning();
|
||||||
|| (QMessageBox::question(this, tr("Game will unpause"),
|
|
||||||
tr("The game will be unpaused, and the next frame will be captured. Is this okay?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes)) {
|
if (was_running ||
|
||||||
if (emu_thread->IsRunning()) {
|
(QMessageBox::question(
|
||||||
|
this, tr("Game will unpause"),
|
||||||
|
tr("The game will be unpaused, and the next frame will be captured. Is this okay?"),
|
||||||
|
QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes)) {
|
||||||
|
if (was_running) {
|
||||||
OnPauseGame();
|
OnPauseGame();
|
||||||
}
|
}
|
||||||
std::string path = UISettings::values.screenshot_path.GetValue();
|
std::string path = UISettings::values.screenshot_path.GetValue();
|
||||||
|
@ -2432,13 +2436,16 @@ void GMainWindow::OnCaptureScreenshot() {
|
||||||
|
|
||||||
static QRegularExpression expr(QStringLiteral("[\\/:?\"<>|]"));
|
static QRegularExpression expr(QStringLiteral("[\\/:?\"<>|]"));
|
||||||
const std::string filename = game_title.remove(expr).toStdString();
|
const std::string filename = game_title.remove(expr).toStdString();
|
||||||
const std::string timestamp =
|
const std::string timestamp = QDateTime::currentDateTime()
|
||||||
QDateTime::currentDateTime().toString(QStringLiteral("dd.MM.yy_hh.mm.ss.z")).toStdString();
|
.toString(QStringLiteral("dd.MM.yy_hh.mm.ss.z"))
|
||||||
|
.toStdString();
|
||||||
path.append(fmt::format("/{}_{}.png", filename, timestamp));
|
path.append(fmt::format("/{}_{}.png", filename, timestamp));
|
||||||
|
|
||||||
auto* const screenshot_window = secondary_window->HasFocus() ? secondary_window : render_window;
|
auto* const screenshot_window =
|
||||||
screenshot_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor.GetValue(),
|
secondary_window->HasFocus() ? secondary_window : render_window;
|
||||||
QString::fromStdString(path));
|
screenshot_window->CaptureScreenshot(
|
||||||
|
UISettings::values.screenshot_resolution_factor.GetValue(),
|
||||||
|
QString::fromStdString(path));
|
||||||
OnStartGame();
|
OnStartGame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue