mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-12 01:57:57 -05:00
Core: Make PerfStats internally locked
More ergonomic to use and will be required for upcoming changes.
This commit is contained in:
@ -104,7 +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 = Core::System::GetInstance().perf_stats.Lock()->GetLastFrameTimeScale();
|
||||
float stretch = Core::System::GetInstance().perf_stats.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);
|
||||
|
Reference in New Issue
Block a user