Skip to content

Commit b9e72c0

Browse files
committed
Fix FPS changer
1 parent e2826cf commit b9e72c0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

PluginBehavior.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,10 @@ private void Update()
9797
}
9898

9999
LastFPSExecuteTime += Time.deltaTime;
100-
if (IMYSConfig.FPS > 60 && LastFPSExecuteTime >= WaitTime && Application.targetFrameRate < IMYSConfig.FPS)
100+
if (IMYSConfig.FPS >= 30 && LastFPSExecuteTime >= WaitTime && Application.targetFrameRate < IMYSConfig.FPS)
101101
{
102102
LastFPSExecuteTime = 0.0f;
103+
QualitySettings.vSyncCount = 0;
103104
Application.targetFrameRate = IMYSConfig.FPS;
104105
Plugin.Global.Log.LogInfo("FPS changed. Reset to: " + IMYSConfig.FPS);
105106
}

0 commit comments

Comments
 (0)