This commit is contained in:
SDraw 2022-11-21 17:41:43 +03:00
parent ab7f66b730
commit ecc1347181
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
2 changed files with 11 additions and 4 deletions

View file

@ -63,7 +63,6 @@ namespace ml_lme
new HarmonyLib.HarmonyMethod(typeof(LeapMotionExtension).GetMethod(nameof(OnGetGesturesFromControllers_Postfix), BindingFlags.Static | BindingFlags.NonPublic)) new HarmonyLib.HarmonyMethod(typeof(LeapMotionExtension).GetMethod(nameof(OnGetGesturesFromControllers_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
); );
MelonLoader.MelonCoroutines.Start(CreateTrackingObjects()); MelonLoader.MelonCoroutines.Start(CreateTrackingObjects());
} }
@ -365,8 +364,15 @@ namespace ml_lme
static void OnGetGesturesFromControllers_Postfix() => ms_instance?.OnGetGesturesFromControllers(); static void OnGetGesturesFromControllers_Postfix() => ms_instance?.OnGetGesturesFromControllers();
void OnGetGesturesFromControllers() void OnGetGesturesFromControllers()
{ {
if(Settings.Enabled && Utils.AreKnucklesInUse() && (m_leapTracked != null)) try
m_leapTracked.UpdateFingers(m_gesturesData); {
if(Settings.Enabled && Utils.AreKnucklesInUse() && (m_leapTracked != null))
m_leapTracked.UpdateFingers(m_gesturesData);
}
catch(System.Exception e)
{
MelonLoader.MelonLogger.Error(e);
}
} }
} }
} }

View file

@ -169,7 +169,8 @@ namespace ml_lme
{ {
ms_trackElbows = bool.Parse(p_value); ms_trackElbows = bool.Parse(p_value);
TrackElbowsChange?.Invoke(ms_trackElbows); TrackElbowsChange?.Invoke(ms_trackElbows);
} break; }
break;
} }
ms_entries[(int)l_setting].BoxedValue = bool.Parse(p_value); ms_entries[(int)l_setting].BoxedValue = bool.Parse(p_value);