From 53709ac54439fad377e92d5ef286aa48a6262fac Mon Sep 17 00:00:00 2001 From: praydog Date: Thu, 18 Jul 2024 18:05:15 -0700 Subject: [PATCH] Fix UE5.4 head aiming/motion controls --- src/mods/vr/IXRTrackingSystemHook.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/mods/vr/IXRTrackingSystemHook.cpp b/src/mods/vr/IXRTrackingSystemHook.cpp index 190a7dcd..d357c820 100644 --- a/src/mods/vr/IXRTrackingSystemHook.cpp +++ b/src/mods/vr/IXRTrackingSystemHook.cpp @@ -41,12 +41,17 @@ detail::IXRTrackingSystemVT& get_tracking_system_vtable(std::optional= 5.3 if (version.dwFileVersionMS == 0x50003 || str_version.starts_with("5.3")) { return ue5_3::IXRTrackingSystemVT::get(); } + // TODO: actually dump 5.2 // >= 5.2 if (version.dwFileVersionMS == 0x50002 || str_version.starts_with("5.2")) { return ue5_1::IXRTrackingSystemVT::get(); @@ -125,6 +130,11 @@ detail::IXRCameraVT& get_camera_vtable(std::optional version_overri version.dwFileVersionMS = 0; } + // TODO: actually dump 5.4 + if (version.dwFileVersionMS == 0x50004 || str_version.starts_with("5.4")) { + return ue5_3::IXRCameraVT::get(); + } + // TODO: actually dump 5.2 if (version.dwFileVersionMS == 0x50003 || str_version.starts_with("5.3")) { return ue5_3::IXRCameraVT::get(); @@ -207,11 +217,17 @@ detail::IHeadMountedDisplayVT& get_hmd_vtable(std::optional version version.dwFileVersionMS = 0; } - // TODO: actually dump 5.2 + // TODO: actually dump 5.4 + if (version.dwFileVersionMS == 0x50004 || str_version.starts_with("5.4")) { + return ue5_3::IHeadMountedDisplayVT::get(); + } + + // 5.3 if (version.dwFileVersionMS == 0x50003 || str_version.starts_with("5.3")) { return ue5_3::IHeadMountedDisplayVT::get(); } + // TODO: actually dump 5.2 // >= 5.2 if (version.dwFileVersionMS == 0x50002 || str_version.starts_with("5.2")) { return ue5_1::IHeadMountedDisplayVT::get();