Skip to content

Commit

Permalink
ModSettings: Bandaid fix BepInEx crash
Browse files Browse the repository at this point in the history
the old BepInEx version is crashing upon applying this patch
removing it until the thunderstore version gets updated
  • Loading branch information
AuriRex committed Jul 11, 2023
1 parent 0c77e0a commit e07d221
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions TheArchive.IL2CPP/Features/Dev/ModSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,15 +330,16 @@ public static void ShowScrollWindow(CM_ScrollWindow window)
#endif
}

#if IL2CPP
#if IL2CPP && !BepInEx // TODO: Remove this BepInEx check later
[RundownConstraint(RundownFlags.RundownFive, RundownFlags.Latest)]
[ArchivePatch(typeof(CM_SettingScrollReceiver), nameof(CM_SettingScrollReceiver.GetFloatDisplayText))]
#endif
#warning TODO: Reintroduce patch later - If patched, this crashes on latest GTFO thunderstore BepInEx release; works on newest Bleeding Edge builds.
public static class CM_SettingScrollReceiver_GetFloatDisplayText_Patch
{
public static bool OverrideDisplayValue { get; set; } = false;
public static float Value { get; set; } = 0f;
public static void Prefix(CM_SettingScrollReceiver __instance, ref float val)
public static void Prefix(ref float val)
{
if(OverrideDisplayValue)
{
Expand Down

0 comments on commit e07d221

Please sign in to comment.