Skip to content

Commit

Permalink
Oops
Browse files Browse the repository at this point in the history
  • Loading branch information
SDraw committed Nov 21, 2022
1 parent ab7f66b commit ecc1347
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions ml_lme/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public override void OnInitializeMelon()
new HarmonyLib.HarmonyMethod(typeof(LeapMotionExtension).GetMethod(nameof(OnGetGesturesFromControllers_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
);


MelonLoader.MelonCoroutines.Start(CreateTrackingObjects());
}

Expand Down Expand Up @@ -365,8 +364,15 @@ void OnSetupAvatar()
static void OnGetGesturesFromControllers_Postfix() => ms_instance?.OnGetGesturesFromControllers();
void OnGetGesturesFromControllers()
{
if(Settings.Enabled && Utils.AreKnucklesInUse() && (m_leapTracked != null))
m_leapTracked.UpdateFingers(m_gesturesData);
try
{
if(Settings.Enabled && Utils.AreKnucklesInUse() && (m_leapTracked != null))
m_leapTracked.UpdateFingers(m_gesturesData);
}
catch(System.Exception e)
{
MelonLoader.MelonLogger.Error(e);
}
}
}
}
3 changes: 2 additions & 1 deletion ml_lme/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ static void OnToggleUpdate(string p_name, string p_value)
{
ms_trackElbows = bool.Parse(p_value);
TrackElbowsChange?.Invoke(ms_trackElbows);
} break;
}
break;
}

ms_entries[(int)l_setting].BoxedValue = bool.Parse(p_value);
Expand Down

0 comments on commit ecc1347

Please sign in to comment.