Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit 72f5375

Browse files
committed
Change QMessageBox::No to QMessageBox::Yes
1 parent 6b1dc49 commit 72f5375

File tree

1 file changed

+27
-28
lines changed

1 file changed

+27
-28
lines changed

src/citra_qt/main.cpp

+27-28
Original file line numberDiff line numberDiff line change
@@ -2412,36 +2412,35 @@ void GMainWindow::OnCaptureScreenshot() {
24122412
return;
24132413
}
24142414

2415-
if (!emu_thread->IsRunning()
2416-
&& (QMessageBox::question(this, tr("Game will unpause"),
2417-
tr("The game will be unpaused, and the next frame will be captured. Is this okay?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No)) {
2418-
return;
2419-
} else {
2420-
OnPauseGame();
2421-
}
2422-
2423-
std::string path = UISettings::values.screenshot_path.GetValue();
2424-
if (!FileUtil::IsDirectory(path)) {
2425-
if (!FileUtil::CreateFullPath(path)) {
2426-
QMessageBox::information(this, tr("Invalid Screenshot Directory"),
2427-
tr("Cannot create specified screenshot directory. Screenshot "
2428-
"path is set back to its default value."));
2429-
path = FileUtil::GetUserPath(FileUtil::UserPath::UserDir);
2430-
path.append("screenshots/");
2431-
UISettings::values.screenshot_path = path;
2432-
};
2433-
}
2415+
if (emu_thread->IsRunning()
2416+
|| (QMessageBox::question(this, tr("Game will unpause"),
2417+
tr("The game will be unpaused, and the next frame will be captured. Is this okay?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes)) {
2418+
if (emu_thread->IsRunning()) {
2419+
OnPauseGame();
2420+
}
2421+
std::string path = UISettings::values.screenshot_path.GetValue();
2422+
if (!FileUtil::IsDirectory(path)) {
2423+
if (!FileUtil::CreateFullPath(path)) {
2424+
QMessageBox::information(this, tr("Invalid Screenshot Directory"),
2425+
tr("Cannot create specified screenshot directory. Screenshot "
2426+
"path is set back to its default value."));
2427+
path = FileUtil::GetUserPath(FileUtil::UserPath::UserDir);
2428+
path.append("screenshots/");
2429+
UISettings::values.screenshot_path = path;
2430+
};
2431+
}
24342432

2435-
static QRegularExpression expr(QStringLiteral("[\\/:?\"<>|]"));
2436-
const std::string filename = game_title.remove(expr).toStdString();
2437-
const std::string timestamp =
2438-
QDateTime::currentDateTime().toString(QStringLiteral("dd.MM.yy_hh.mm.ss.z")).toStdString();
2439-
path.append(fmt::format("/{}_{}.png", filename, timestamp));
2433+
static QRegularExpression expr(QStringLiteral("[\\/:?\"<>|]"));
2434+
const std::string filename = game_title.remove(expr).toStdString();
2435+
const std::string timestamp =
2436+
QDateTime::currentDateTime().toString(QStringLiteral("dd.MM.yy_hh.mm.ss.z")).toStdString();
2437+
path.append(fmt::format("/{}_{}.png", filename, timestamp));
24402438

2441-
auto* const screenshot_window = secondary_window->HasFocus() ? secondary_window : render_window;
2442-
screenshot_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor.GetValue(),
2443-
QString::fromStdString(path));
2444-
OnStartGame();
2439+
auto* const screenshot_window = secondary_window->HasFocus() ? secondary_window : render_window;
2440+
screenshot_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor.GetValue(),
2441+
QString::fromStdString(path));
2442+
OnStartGame();
2443+
}
24452444
}
24462445

24472446
void GMainWindow::OnDumpVideo() {

0 commit comments

Comments
 (0)