forked from dolphin-emu/dolphin
		
	Approximately three or four times now, the issue of pointers being in an inconsistent state been an issue in the video backend renderers with regards to tripping up other developers. Global (ugh) resources are put into a unique_ptr and will always have a well-defined state of being - null or not null
		
			
				
	
	
		
			15 lines
		
	
	
		
			336 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			336 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| // Copyright 2012 Dolphin Emulator Project
 | |
| // Licensed under GPLv2+
 | |
| // Refer to the license.txt file included.
 | |
| 
 | |
| #include <memory>
 | |
| #include "VideoCommon/PerfQueryBase.h"
 | |
| #include "VideoCommon/VideoConfig.h"
 | |
| 
 | |
| std::unique_ptr<PerfQueryBase> g_perf_query;
 | |
| 
 | |
| bool PerfQueryBase::ShouldEmulate()
 | |
| {
 | |
| 	return g_ActiveConfig.bPerfQueriesEnable;
 | |
| }
 |