We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b34599b commit fbc0d33Copy full SHA for fbc0d33
AquaMai.Mods/Utils/AntiLag.cs
@@ -12,6 +12,9 @@ namespace AquaMai.Mods.Utils;
12
zh: "奇妙的防掉帧,如果你有莫名其妙的掉帧,可以试试这个")]
13
public class AntiLag : MonoBehaviour
14
{
15
+ [ConfigEntry(zh: "游戏未取得焦点时也运行")]
16
+ private static readonly bool activateWhileBackground = false;
17
+
18
[HarmonyPostfix]
19
[HarmonyPatch(typeof(GameMainObject), "Awake")]
20
public static void OnGameMainObjectAwake()
@@ -34,7 +37,7 @@ private void Awake()
34
37
35
38
private void OnTimer()
36
39
- if (!Application.isFocused) return;
40
+ if (!Application.isFocused && !activateWhileBackground) return;
41
#if DEBUG
42
MelonLogger.Msg("[AntiLag] Trigger");
43
#endif
0 commit comments