From f7cda4b2b4cafe303ae14d40eb1e6077daa04ce4 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Thu, 11 Dec 2025 04:47:20 +0100 Subject: [PATCH] cellGem: fix default orientation --- rpcs3/Emu/Io/PadHandler.cpp | 2 +- rpcs3/Emu/Io/pad_types.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Io/PadHandler.cpp b/rpcs3/Emu/Io/PadHandler.cpp index 4fc8fa6376..175cd3e90a 100644 --- a/rpcs3/Emu/Io/PadHandler.cpp +++ b/rpcs3/Emu/Io/PadHandler.cpp @@ -950,7 +950,7 @@ void PadDevice::update_orientation(ps_move_data& move_data) // Get elapsed time since last update const u64 now_us = get_system_time(); - const float elapsed_sec = (last_ahrs_update_time_us == 0) ? 0.0f : ((now_us - last_ahrs_update_time_us) / 1'000'000.0f); + const f32 elapsed_sec = (last_ahrs_update_time_us == 0) ? 0.0f : ((now_us - last_ahrs_update_time_us) / 1'000'000.0f); last_ahrs_update_time_us = now_us; // The ps move handler's axis may differ from the Fusion axis, so we have to map them correctly. diff --git a/rpcs3/Emu/Io/pad_types.h b/rpcs3/Emu/Io/pad_types.h index 8c669a9413..eeeec3c658 100644 --- a/rpcs3/Emu/Io/pad_types.h +++ b/rpcs3/Emu/Io/pad_types.h @@ -485,7 +485,7 @@ struct ps_move_data bool magnetometer_enabled = false; bool orientation_enabled = false; - static constexpr std::array default_quaternion { 1.0f, 0.0f, 0.0f, 0.0f }; + static constexpr std::array default_quaternion { 0.0f, 0.0f, 0.0f, 1.0f }; std::array quaternion = default_quaternion; // quaternion orientation (x,y,z,w) of controller relative to default (facing the camera with buttons up) f32 accelerometer_x = 0.0f; // linear velocity in m/s² f32 accelerometer_y = 0.0f; // linear velocity in m/s²