Skip to content

Commit

Permalink
Fixes #94
Browse files Browse the repository at this point in the history
  • Loading branch information
kinsi55 committed Nov 25, 2022
1 parent 08b3efc commit aa93200
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion HarmonyPatches/GlobalFPSCap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ static void ApplyFPSCap(bool isHmdPresent) {
} else {
var Kapp = 30;

var srr = Screen.currentResolution.refreshRate;
if(CamManager.cams?.Count > 0) {
QualitySettings.vSyncCount = 1;
var srr = Screen.currentResolution.refreshRate;
Kapp = -1;

foreach(var cam in CamManager.cams.Values.Where(x => x.gameObject.activeInHierarchy)) {
Expand All @@ -66,6 +66,8 @@ static void ApplyFPSCap(bool isHmdPresent) {
QualitySettings.vSyncCount = 0;
}
}
} else {
Kapp = srr;
}

Application.targetFrameRate = Kapp;
Expand Down

0 comments on commit aa93200

Please sign in to comment.