mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	PerfStats: Add method to get the instantaneous time ratio
This commit is contained in:
		
							parent
							
								
									c75ae6c585
								
							
						
					
					
						commit
						92c8bd4b1f
					
				
					 3 changed files with 22 additions and 7 deletions
				
			
		|  | @ -5,7 +5,7 @@ | |||
| #include <algorithm> | ||||
| #include <cmath> | ||||
| #include "common/assert.h" | ||||
| #include "common/profiler_reporting.h" | ||||
| #include "core/core.h" | ||||
| #include "core/frontend/emu_window.h" | ||||
| #include "core/frontend/key_map.h" | ||||
| #include "video_core/video_core.h" | ||||
|  | @ -104,8 +104,7 @@ void EmuWindow::AccelerometerChanged(float x, float y, float z) { | |||
| void EmuWindow::GyroscopeChanged(float x, float y, float z) { | ||||
|     constexpr float FULL_FPS = 60; | ||||
|     float coef = GetGyroscopeRawToDpsCoefficient(); | ||||
|     float stretch = | ||||
|         FULL_FPS / Common::Profiling::GetTimingResultsAggregator()->GetAggregatedResults().fps; | ||||
|     float stretch = Core::System::GetInstance().perf_stats.Lock()->GetLastFrameTimeScale(); | ||||
|     std::lock_guard<std::mutex> lock(gyro_mutex); | ||||
|     gyro_x = static_cast<s16>(x * coef * stretch); | ||||
|     gyro_y = static_cast<s16>(y * coef * stretch); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue