Skip to content

Commit

Permalink
forgot this
Browse files Browse the repository at this point in the history
  • Loading branch information
zastlx committed Jun 11, 2024
1 parent 322608f commit 3f91001
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/module/modules/misc/FPSUnlocker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Module } from "../../ModuleManager";
import { getGameManager } from "@api/Game";
import cocos from "@api/cocos";
import { ModuleSettingBool, ModuleSettingNumber } from "module/ModuleManager.types";
import { ModuleSettingNumber } from "module/ModuleManager.types";
import { after } from "spitroast";

enum GameState {
Expand Down Expand Up @@ -31,6 +31,8 @@ class FPSUnlockedModule extends Module {
// incase i fail cleanup
if (!this.isEnabled()) return;

if (this.getSettings().get("Infinite FPS")?.currentValue) return cocos().game.setFrameRate(999999);

if (!document.hasFocus()) return cocos().game.setFrameRate((this.getSettings().get("Unfocused FPS") as ModuleSettingNumber)?.currentValue);

switch (this.currentGameState) {
Expand Down

0 comments on commit 3f91001

Please sign in to comment.