From 44f36b74a28f1946b7fd68bde2e4c110528d9606 Mon Sep 17 00:00:00 2001 From: kafeijao Date: Tue, 17 Sep 2024 10:09:41 +0100 Subject: [PATCH] [FreedomFingers] Fix issue of gesture toggle not working when bound to the right hand controller --- FreedomFingers/Main.cs | 10 ++++++---- FreedomFingers/Properties/AssemblyInfo.cs | 2 +- FreedomFingers/Properties/CVRMG.json | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/FreedomFingers/Main.cs b/FreedomFingers/Main.cs index 0f2dc82..9dc4365 100644 --- a/FreedomFingers/Main.cs +++ b/FreedomFingers/Main.cs @@ -78,9 +78,11 @@ private static class HarmonyPatches { private static void After_CVRInputModule_XR_Update_Emotes(CVRInputModule_XR __instance) { // Undo the default clicking of the button. We have our own detection (so you can change the keybind in steamvr) - if (__instance._leftModule.Type == eXRControllerType.Index && (!__instance.firstFindIndex || - !__instance._inputManager.oneHanded && - __instance._leftModule.PrimaryButton)) { + if (__instance._leftModule.Type == eXRControllerType.Index && + (!__instance.firstFindIndex || + !__instance._inputManager.oneHanded && __instance._leftModule.PrimaryButton || + __instance._leftModule.GestureToggleOverride || __instance._rightModule.GestureToggleOverride)) + { // Revert the toggling Traverse.Create(__instance).Property(nameof(__instance.GestureToggleValue)).Value = !__instance.GestureToggleValue; @@ -98,7 +100,7 @@ private static void After_CVRInputModule_XR_Update_Emotes(CVRInputModule_XR __in // Send the notification when toggling gestures if (_melonEntryEnableNotification.Value && CohtmlHud.Instance != null) { - CohtmlHud.Instance.ViewDropTextImmediate("", "", $"Gestures {(__instance.GestureToggleValue ? "Enabled" : "Disabled")}"); + CohtmlHud.Instance.ViewDropTextImmediate("", "", $"Gestures {(__instance.GestureToggleValue ? "Enabled" : "Disabled")}", "", false); CohtmlHud.Instance.ShowHud(); } diff --git a/FreedomFingers/Properties/AssemblyInfo.cs b/FreedomFingers/Properties/AssemblyInfo.cs index f7d7e3e..6cdb4ff 100644 --- a/FreedomFingers/Properties/AssemblyInfo.cs +++ b/FreedomFingers/Properties/AssemblyInfo.cs @@ -26,6 +26,6 @@ namespace Kafe.FreedomFingers.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.9"; + public const string Version = "1.0.10"; public const string Author = "kafeijao"; } diff --git a/FreedomFingers/Properties/CVRMG.json b/FreedomFingers/Properties/CVRMG.json index b68ccfd..f881a41 100644 --- a/FreedomFingers/Properties/CVRMG.json +++ b/FreedomFingers/Properties/CVRMG.json @@ -1,7 +1,7 @@ { "_id": 101, "name": "FreedomFingers", - "modversion": "1.0.9", + "modversion": "1.0.10", "gameversion": "2024r176", "loaderversion": "v0.6.1", "modtype": "Mod", @@ -17,6 +17,6 @@ "requirements": [], "downloadlink": "https://github.com/kafeijao/Kafe_CVR_Mods/releases/download/r72/FreedomFingers.dll", "sourcelink": "https://github.com/kafeijao/Kafe_CVR_Mods/tree/master/FreedomFingers", - "changelog": "- Added compatibility with both Stable and Nightly", + "changelog": "- Fixed gesture toggle not working when bound to the right hand controller", "embedcolor": "16C60C" }