mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Fix a bug in the fullscreen implementation
This commit is contained in:
		
							parent
							
								
									e23c3cd7f7
								
							
						
					
					
						commit
						8942bfd759
					
				
					 2 changed files with 31 additions and 15 deletions
				
			
		|  | @ -583,7 +583,9 @@ void GMainWindow::BootGame(const QString& filename) { | ||||||
|     render_window->setFocus(); |     render_window->setFocus(); | ||||||
| 
 | 
 | ||||||
|     emulation_running = true; |     emulation_running = true; | ||||||
|     ToggleFullscreen(); |     if (ui.action_Fullscreen->isChecked()) { | ||||||
|  |         ShowFullscreen(); | ||||||
|  |     } | ||||||
|     OnStartGame(); |     OnStartGame(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -812,21 +814,33 @@ void GMainWindow::ToggleFullscreen() { | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
|     if (ui.action_Fullscreen->isChecked()) { |     if (ui.action_Fullscreen->isChecked()) { | ||||||
|  |         ShowFullscreen(); | ||||||
|  |     } else { | ||||||
|  |         HideFullscreen(); | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void GMainWindow::ShowFullscreen() { | ||||||
|     if (ui.action_Single_Window_Mode->isChecked()) { |     if (ui.action_Single_Window_Mode->isChecked()) { | ||||||
|  |         UISettings::values.geometry = saveGeometry(); | ||||||
|         ui.menubar->hide(); |         ui.menubar->hide(); | ||||||
|         statusBar()->hide(); |         statusBar()->hide(); | ||||||
|         showFullScreen(); |         showFullScreen(); | ||||||
|     } else { |     } else { | ||||||
|  |         UISettings::values.renderwindow_geometry = render_window->saveGeometry(); | ||||||
|         render_window->showFullScreen(); |         render_window->showFullScreen(); | ||||||
|     } |     } | ||||||
|     } else { | } | ||||||
|  | 
 | ||||||
|  | void GMainWindow::HideFullscreen() { | ||||||
|     if (ui.action_Single_Window_Mode->isChecked()) { |     if (ui.action_Single_Window_Mode->isChecked()) { | ||||||
|         statusBar()->setVisible(ui.action_Show_Status_Bar->isChecked()); |         statusBar()->setVisible(ui.action_Show_Status_Bar->isChecked()); | ||||||
|         ui.menubar->show(); |         ui.menubar->show(); | ||||||
|         showNormal(); |         showNormal(); | ||||||
|  |         restoreGeometry(UISettings::values.geometry); | ||||||
|     } else { |     } else { | ||||||
|         render_window->showNormal(); |         render_window->showNormal(); | ||||||
|         } |         render_window->restoreGeometry(UISettings::values.renderwindow_geometry); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -141,6 +141,8 @@ private slots: | ||||||
|     void OnToggleFilterBar(); |     void OnToggleFilterBar(); | ||||||
|     void OnDisplayTitleBars(bool); |     void OnDisplayTitleBars(bool); | ||||||
|     void ToggleFullscreen(); |     void ToggleFullscreen(); | ||||||
|  |     void ShowFullscreen(); | ||||||
|  |     void HideFullscreen(); | ||||||
|     void ToggleWindowMode(); |     void ToggleWindowMode(); | ||||||
|     void OnCreateGraphicsSurfaceViewer(); |     void OnCreateGraphicsSurfaceViewer(); | ||||||
|     void OnCoreError(Core::System::ResultStatus, std::string); |     void OnCoreError(Core::System::ResultStatus, std::string); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue