Skip to content

Commit

Permalink
[FreedomFingers] Fix issue of gesture toggle not working when bound t…
Browse files Browse the repository at this point in the history
…o the right hand controller
  • Loading branch information
kafeijao committed Sep 17, 2024
1 parent faa1530 commit 44f36b7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions FreedomFingers/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>(nameof(__instance.GestureToggleValue)).Value = !__instance.GestureToggleValue;

Expand All @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion FreedomFingers/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
4 changes: 2 additions & 2 deletions FreedomFingers/Properties/CVRMG.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"_id": 101,
"name": "FreedomFingers",
"modversion": "1.0.9",
"modversion": "1.0.10",
"gameversion": "2024r176",
"loaderversion": "v0.6.1",
"modtype": "Mod",
Expand All @@ -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"
}

0 comments on commit 44f36b7

Please sign in to comment.