diff options
author | James Rowe <jroweboy@gmail.com> | 2017-08-20 07:43:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-20 07:43:01 +0200 |
commit | bbfa9d0635ce4b9226bed02ea1b6e8ddbb7e8a56 (patch) | |
tree | 5bfecf66096077d72346da902a9646314cb60631 /src/core/frontend/emu_window.cpp | |
parent | Merge pull request #2871 from wwylele/sw-spotlight (diff) | |
parent | HID: fix a comment and a warning (diff) | |
download | yuzu-bbfa9d0635ce4b9226bed02ea1b6e8ddbb7e8a56.tar yuzu-bbfa9d0635ce4b9226bed02ea1b6e8ddbb7e8a56.tar.gz yuzu-bbfa9d0635ce4b9226bed02ea1b6e8ddbb7e8a56.tar.bz2 yuzu-bbfa9d0635ce4b9226bed02ea1b6e8ddbb7e8a56.tar.lz yuzu-bbfa9d0635ce4b9226bed02ea1b6e8ddbb7e8a56.tar.xz yuzu-bbfa9d0635ce4b9226bed02ea1b6e8ddbb7e8a56.tar.zst yuzu-bbfa9d0635ce4b9226bed02ea1b6e8ddbb7e8a56.zip |
Diffstat (limited to 'src/core/frontend/emu_window.cpp')
-rw-r--r-- | src/core/frontend/emu_window.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/core/frontend/emu_window.cpp b/src/core/frontend/emu_window.cpp index 4f7d54a33..60b20d4e2 100644 --- a/src/core/frontend/emu_window.cpp +++ b/src/core/frontend/emu_window.cpp @@ -62,29 +62,6 @@ void EmuWindow::TouchMoved(unsigned framebuffer_x, unsigned framebuffer_y) { TouchPressed(framebuffer_x, framebuffer_y); } -void EmuWindow::AccelerometerChanged(float x, float y, float z) { - constexpr float coef = 512; - - std::lock_guard<std::mutex> lock(accel_mutex); - - // TODO(wwylele): do a time stretch as it in GyroscopeChanged - // The time stretch formula should be like - // stretched_vector = (raw_vector - gravity) * stretch_ratio + gravity - accel_x = static_cast<s16>(x * coef); - accel_y = static_cast<s16>(y * coef); - accel_z = static_cast<s16>(z * coef); -} - -void EmuWindow::GyroscopeChanged(float x, float y, float z) { - constexpr float FULL_FPS = 60; - float coef = GetGyroscopeRawToDpsCoefficient(); - 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); - gyro_z = static_cast<s16>(z * coef * stretch); -} - void EmuWindow::UpdateCurrentFramebufferLayout(unsigned width, unsigned height) { Layout::FramebufferLayout layout; if (Settings::values.custom_layout == true) { |