mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
Add file extension to screenshot filename if not provided
This commit is contained in:
parent
72c70d6808
commit
284536a626
1 changed files with 7 additions and 3 deletions
|
@ -1682,9 +1682,13 @@ void GMainWindow::OnToggleFilterBar() {
|
|||
|
||||
void GMainWindow::OnCaptureScreenshot() {
|
||||
OnPauseGame();
|
||||
const QString path =
|
||||
QFileDialog::getSaveFileName(this, tr("Capture Screenshot"),
|
||||
UISettings::values.screenshot_path, tr("PNG Image (*.png)"));
|
||||
QFileDialog png_dialog(this, tr("Capture Screenshot"), UISettings::values.screenshot_path,
|
||||
tr("PNG Image (*.png)"));
|
||||
png_dialog.setAcceptMode(QFileDialog::AcceptSave);
|
||||
png_dialog.setDefaultSuffix("png");
|
||||
png_dialog.exec();
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue