mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	system: Add a function to see if the emulator is running.
This commit is contained in:
		
							parent
							
								
									08ad9b36d4
								
							
						
					
					
						commit
						7299895b48
					
				
					 2 changed files with 11 additions and 0 deletions
				
			
		|  | @ -17,6 +17,8 @@ | ||||||
| 
 | 
 | ||||||
| namespace System { | namespace System { | ||||||
| 
 | 
 | ||||||
|  | static bool is_powered_on{ false }; | ||||||
|  | 
 | ||||||
| Result Init(EmuWindow* emu_window) { | Result Init(EmuWindow* emu_window) { | ||||||
|     Core::Init(); |     Core::Init(); | ||||||
|     CoreTiming::Init(); |     CoreTiming::Init(); | ||||||
|  | @ -30,9 +32,15 @@ Result Init(EmuWindow* emu_window) { | ||||||
|     AudioCore::Init(); |     AudioCore::Init(); | ||||||
|     GDBStub::Init(); |     GDBStub::Init(); | ||||||
| 
 | 
 | ||||||
|  |     is_powered_on = true; | ||||||
|  | 
 | ||||||
|     return Result::Success; |     return Result::Success; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | bool IsPoweredOn() { | ||||||
|  |     return is_powered_on; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| void Shutdown() { | void Shutdown() { | ||||||
|     GDBStub::Shutdown(); |     GDBStub::Shutdown(); | ||||||
|     AudioCore::Shutdown(); |     AudioCore::Shutdown(); | ||||||
|  | @ -42,6 +50,8 @@ void Shutdown() { | ||||||
|     HW::Shutdown(); |     HW::Shutdown(); | ||||||
|     CoreTiming::Shutdown(); |     CoreTiming::Shutdown(); | ||||||
|     Core::Shutdown(); |     Core::Shutdown(); | ||||||
|  | 
 | ||||||
|  |     is_powered_on = false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| } // namespace
 | } // namespace
 | ||||||
|  |  | ||||||
|  | @ -16,6 +16,7 @@ enum class Result { | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| Result Init(EmuWindow* emu_window); | Result Init(EmuWindow* emu_window); | ||||||
|  | bool IsPoweredOn(); | ||||||
| void Shutdown(); | void Shutdown(); | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue