Fix Unlock FPS not applying on game start

This commit is contained in:
D1GQ committed 2026-02-26 16:44:03 -06:00
1 parent 7297ad7386
commit 5849a57941
2 files changed
+5 -2

No files matched your search

+3
View File
@@ -11,6 +11,7 @@ using BetterAmongUs.Modules;
using BetterAmongUs.Modules.OptionItems;
using BetterAmongUs.Modules.Support;
using BetterAmongUs.Network;
using BetterAmongUs.Patches.Client;
using BetterAmongUs.Patches.Gameplay.UI.Settings;
using HarmonyLib;
using Il2CppInterop.Runtime.Injection;
@@ -302,6 +303,8 @@ internal class BAUPlugin : BasePlugin
UnlockFPS, ShowFPS, CommandPrefix,
FavoriteColor, SettingsPreset
]);
OptionsMenuBehaviourPatch.UpdateFrameRate();
}
/// <summary>
@@ -113,10 +113,10 @@ internal static class OptionsMenuBehaviourPatch
}
}
private static void UpdateFrameRate()
internal static void UpdateFrameRate()
{
// Toggle between 60 FPS (default) and 165 FPS
Application.targetFrameRate = BAUPlugin.UnlockFPS.Value ? 165 : 60;
Application.targetFrameRate = BAUPlugin.UnlockFPS.Value ? 999 : 60;
}
private static void OpenSaveData()