mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 14:52:45 +01:00
Merge pull request #6837 from german77/no-pause-screenshot
main: Avoid stopping emulation when taking a screenshot
This commit is contained in:
commit
9fbe188c01
1 changed files with 2 additions and 5 deletions
|
@ -2814,8 +2814,6 @@ void GMainWindow::OnToggleFilterBar() {
|
|||
}
|
||||
|
||||
void GMainWindow::OnCaptureScreenshot() {
|
||||
OnPauseGame();
|
||||
|
||||
const u64 title_id = Core::System::GetInstance().CurrentProcess()->GetTitleID();
|
||||
const auto screenshot_path =
|
||||
QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir));
|
||||
|
@ -2827,23 +2825,22 @@ void GMainWindow::OnCaptureScreenshot() {
|
|||
.arg(date);
|
||||
|
||||
if (!Common::FS::CreateDir(screenshot_path.toStdString())) {
|
||||
OnStartGame();
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
if (UISettings::values.enable_screenshot_save_as) {
|
||||
OnPauseGame();
|
||||
filename = QFileDialog::getSaveFileName(this, tr("Capture Screenshot"), filename,
|
||||
tr("PNG Image (*.png)"));
|
||||
OnStartGame();
|
||||
if (filename.isEmpty()) {
|
||||
OnStartGame();
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor.GetValue(),
|
||||
filename);
|
||||
OnStartGame();
|
||||
}
|
||||
|
||||
// TODO: Written 2020-10-01: Remove per-game config migration code when it is irrelevant
|
||||
|
|
Loading…
Reference in a new issue