diff options
author | bunnei <bunneidev@gmail.com> | 2021-12-21 09:13:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-21 09:13:54 +0100 |
commit | 5e24f7ed3106542838a557dd2cc872e7e338fbb5 (patch) | |
tree | ac773436f7767a0d5c6c411f0717269cbd19f29a /src/core/hle/service/hid/controllers/console_sixaxis.h | |
parent | Merge pull request #7609 from Tatsh/file-assoc (diff) | |
parent | service/hid: Improve console motion accuracy (diff) | |
download | yuzu-5e24f7ed3106542838a557dd2cc872e7e338fbb5.tar yuzu-5e24f7ed3106542838a557dd2cc872e7e338fbb5.tar.gz yuzu-5e24f7ed3106542838a557dd2cc872e7e338fbb5.tar.bz2 yuzu-5e24f7ed3106542838a557dd2cc872e7e338fbb5.tar.lz yuzu-5e24f7ed3106542838a557dd2cc872e7e338fbb5.tar.xz yuzu-5e24f7ed3106542838a557dd2cc872e7e338fbb5.tar.zst yuzu-5e24f7ed3106542838a557dd2cc872e7e338fbb5.zip |
Diffstat (limited to 'src/core/hle/service/hid/controllers/console_sixaxis.h')
-rw-r--r-- | src/core/hle/service/hid/controllers/console_sixaxis.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/hle/service/hid/controllers/console_sixaxis.h b/src/core/hle/service/hid/controllers/console_sixaxis.h index 279241858..26d153f0c 100644 --- a/src/core/hle/service/hid/controllers/console_sixaxis.h +++ b/src/core/hle/service/hid/controllers/console_sixaxis.h @@ -39,8 +39,9 @@ public: private: struct SevenSixAxisState { - INSERT_PADDING_WORDS(4); // unused - s64 sampling_number{}; + INSERT_PADDING_WORDS(2); // unused + u64 timestamp{}; + u64 sampling_number{}; u64 unknown{}; Common::Vec3f accel{}; Common::Vec3f gyro{}; @@ -52,9 +53,10 @@ private: struct ConsoleSharedMemory { u64 sampling_number{}; bool is_seven_six_axis_sensor_at_rest{}; - INSERT_PADDING_BYTES(4); // padding + INSERT_PADDING_BYTES(3); // padding f32 verticalization_error{}; Common::Vec3f gyro_bias{}; + INSERT_PADDING_BYTES(4); // padding }; static_assert(sizeof(ConsoleSharedMemory) == 0x20, "ConsoleSharedMemory is an invalid size"); @@ -64,6 +66,8 @@ private: Core::HID::EmulatedConsole* console; u8* transfer_memory = nullptr; bool is_transfer_memory_set = false; + u64 last_saved_timestamp{}; + u64 last_global_timestamp{}; ConsoleSharedMemory console_six_axis{}; SevenSixAxisState next_seven_sixaxis_state{}; }; |