Respect if overlay is toggled

This commit is contained in:
BenjaminZehowlt
2024-10-28 02:03:21 -04:00
committed by Natsumi
parent c4d958b8ba
commit e8d278753d
2 changed files with 72 additions and 40 deletions

View File

@@ -356,18 +356,18 @@ namespace VRCX
public void ExecuteVrFeedFunction(string function, string json)
{
if (VRCXVR._browser1 == null) return;
if (VRCXVR._browser1.IsLoading)
if (VRCXVR._wristOverlay == null) return;
if (VRCXVR._wristOverlay.IsLoading)
VRCXVR.Instance.Restart();
VRCXVR._browser1.ExecuteScriptAsync($"$app.{function}", json);
VRCXVR._wristOverlay.ExecuteScriptAsync($"$app.{function}", json);
}
public void ExecuteVrOverlayFunction(string function, string json)
{
if (VRCXVR._browser2 == null) return;
if (VRCXVR._browser2.IsLoading)
if (VRCXVR._hmdOverlay == null) return;
if (VRCXVR._hmdOverlay.IsLoading)
VRCXVR.Instance.Restart();
VRCXVR._browser2.ExecuteScriptAsync($"$app.{function}", json);
VRCXVR._hmdOverlay.ExecuteScriptAsync($"$app.{function}", json);
}
/// <summary>