mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Add file extension to screenshot filename if not provided
This commit is contained in:
		
							parent
							
								
									95a57a2fe3
								
							
						
					
					
						commit
						82acde7e4b
					
				
					 1 changed files with 7 additions and 3 deletions
				
			
		|  | @ -1561,9 +1561,13 @@ void GMainWindow::OnStopRecordingPlayback() { | ||||||
| 
 | 
 | ||||||
| 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); | ||||||
|  |     png_dialog.setDefaultSuffix("png"); | ||||||
|  |     png_dialog.exec(); | ||||||
|  | 
 | ||||||
|  |     const QString path = png_dialog.selectedFiles().first(); | ||||||
|     if (!path.isEmpty()) { |     if (!path.isEmpty()) { | ||||||
|         UISettings::values.screenshot_path = QFileInfo(path).path(); |         UISettings::values.screenshot_path = QFileInfo(path).path(); | ||||||
|         render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor, path); |         render_window->CaptureScreenshot(UISettings::values.screenshot_resolution_factor, path); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue