Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Fixed exception on the Oculus version of VRChat.
Browse files Browse the repository at this point in the history
  • Loading branch information
RequiDev committed Jun 11, 2022
1 parent 0ce39e0 commit 9faf08d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 193 deletions.
172 changes: 0 additions & 172 deletions ReModCE/Components/CalibrationSavingComponent.cs

This file was deleted.

23 changes: 2 additions & 21 deletions ReModCE/ReModCE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using HarmonyLib;
using MelonLoader;
Expand Down Expand Up @@ -35,7 +36,6 @@ public static class ReModCE
public static ReMirroredWingMenu WingMenu;
public static bool IsEmmVRCLoaded { get; private set; }
public static bool IsRubyLoaded { get; private set; }
public static bool IsOculus { get; private set; }
public static bool IsComponentToggleLoaded { get; private set; }

public static List<ReUiButton> SocialMenuButtons = new List<ReUiButton>();
Expand Down Expand Up @@ -77,31 +77,12 @@ public static void OnApplicationStart()

EnableDisableListener.RegisterSafe();
ClassInjector.RegisterTypeInIl2Cpp<WireframeEnabler>();

SetIsOculus();

ReLogger.Msg($"Running on {(IsOculus ? "Not Steam" : "Steam")}");


InitializePatches();
InitializeModComponents();
ReLogger.Msg("Done!");
}

private static void SetIsOculus()
{
try
{
var steamTracking = typeof(VRCTrackingSteam);
}
catch (TypeLoadException)
{
IsOculus = true;
return;
}

IsOculus = false;
}

private static HarmonyMethod GetLocalPatch(string name)
{
return typeof(ReModCE).GetMethod(name, BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod();
Expand Down

0 comments on commit 9faf08d

Please sign in to comment.