mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Fix to windows sleep issues, now with clang format!
This commit is contained in:
		
							parent
							
								
									285b2b3207
								
							
						
					
					
						commit
						bcf33b0ac6
					
				
					 1 changed files with 15 additions and 0 deletions
				
			
		|  | @ -18,6 +18,9 @@ | |||
| #ifdef __APPLE__ | ||||
| #include <unistd.h> // for chdir
 | ||||
| #endif | ||||
| #ifdef _WIN32 | ||||
| #include <windows.h> | ||||
| #endif | ||||
| #include "citra_qt/aboutdialog.h" | ||||
| #include "citra_qt/applets/mii_selector.h" | ||||
| #include "citra_qt/applets/swkbd.h" | ||||
|  | @ -899,6 +902,10 @@ void GMainWindow::ShutdownGame() { | |||
|         return; | ||||
|     } | ||||
| 
 | ||||
| #ifdef _WIN32 | ||||
|     SetThreadExecutionState(ES_CONTINUOUS); | ||||
| #endif | ||||
| 
 | ||||
|     discord_rpc->Pause(); | ||||
|     OnStopRecordingPlayback(); | ||||
|     emu_thread->RequestStop(); | ||||
|  | @ -1216,6 +1223,10 @@ void GMainWindow::OnStartGame() { | |||
|         movie_record_path.clear(); | ||||
|     } | ||||
| 
 | ||||
| #ifdef _WIN32 | ||||
|     SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED); | ||||
| #endif | ||||
| 
 | ||||
|     emu_thread->SetRunning(true); | ||||
|     qRegisterMetaType<Core::System::ResultStatus>("Core::System::ResultStatus"); | ||||
|     qRegisterMetaType<std::string>("std::string"); | ||||
|  | @ -1243,6 +1254,10 @@ void GMainWindow::OnPauseGame() { | |||
|     ui.action_Pause->setEnabled(false); | ||||
|     ui.action_Stop->setEnabled(true); | ||||
|     ui.action_Capture_Screenshot->setEnabled(false); | ||||
| 
 | ||||
| #ifdef _WIN32 | ||||
|     SetThreadExecutionState(ES_CONTINUOUS); | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
| void GMainWindow::OnStopGame() { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue