mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-29 23:06:23 -05:00
Merge pull request #2086 from FearlessTobi/port-4583
Port citra-emu/citra#4583: "citra_qt: Fix saving screenshot when no file extension is provided"
This commit is contained in:
commit
b34ae2235d
1 changed files with 10 additions and 6 deletions
|
@ -1682,12 +1682,16 @@ void GMainWindow::OnToggleFilterBar() {
|
||||||
|
|
||||||
void GMainWindow::OnCaptureScreenshot() {
|
void GMainWindow::OnCaptureScreenshot() {
|
||||||
OnPauseGame();
|
OnPauseGame();
|
||||||
const QString path =
|
QFileDialog png_dialog(this, tr("Capture Screenshot"), UISettings::values.screenshot_path,
|
||||||
QFileDialog::getSaveFileName(this, tr("Capture Screenshot"),
|
tr("PNG Image (*.png)"));
|
||||||
UISettings::values.screenshot_path, tr("PNG Image (*.png)"));
|
png_dialog.setAcceptMode(QFileDialog::AcceptSave);
|
||||||
if (!path.isEmpty()) {
|
png_dialog.setDefaultSuffix("png");
|
||||||
UISettings::values.screenshot_path = QFileInfo(path).path();
|
if (png_dialog.exec()) {
|
||||||
render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor, path);
|
const QString path = png_dialog.selectedFiles().first();
|
||||||
|
if (!path.isEmpty()) {
|
||||||
|
UISettings::values.screenshot_path = QFileInfo(path).path();
|
||||||
|
render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor, path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
OnStartGame();
|
OnStartGame();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue