mirror of
https://github.com/citra-emu/citra-canary.git
synced 2024-12-26 03:55:31 +00:00
Merge pull request #4583 from xperia64/screenshot_fix
citra_qt: Fix saving screenshot when no file extension is provided
This commit is contained in:
commit
2731437a17
|
@ -1561,13 +1561,17 @@ void GMainWindow::OnStopRecordingPlayback() {
|
|||
|
||||
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");
|
||||
if (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);
|
||||
}
|
||||
}
|
||||
OnStartGame();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue