diff --git a/ml_lme/Main.cs b/ml_lme/Main.cs index 84c9feb..eb5874c 100644 --- a/ml_lme/Main.cs +++ b/ml_lme/Main.cs @@ -63,7 +63,6 @@ namespace ml_lme new HarmonyLib.HarmonyMethod(typeof(LeapMotionExtension).GetMethod(nameof(OnGetGesturesFromControllers_Postfix), BindingFlags.Static | BindingFlags.NonPublic)) ); - MelonLoader.MelonCoroutines.Start(CreateTrackingObjects()); } @@ -365,8 +364,15 @@ namespace ml_lme 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); + } } } } diff --git a/ml_lme/Settings.cs b/ml_lme/Settings.cs index 0dcf626..aa5fd79 100644 --- a/ml_lme/Settings.cs +++ b/ml_lme/Settings.cs @@ -169,7 +169,8 @@ namespace ml_lme { ms_trackElbows = bool.Parse(p_value); TrackElbowsChange?.Invoke(ms_trackElbows); - } break; + } + break; } ms_entries[(int)l_setting].BoxedValue = bool.Parse(p_value);