Skip to content

Commit

Permalink
Oculus FPS cap hackfix for now (#101)
Browse files Browse the repository at this point in the history
* Fix for console error in oculus mode

* Comment out GlobalFPSCap.Init()
  • Loading branch information
kinsi55 authored May 13, 2023
2 parents e48a55e + b31541e commit 2a7f958
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions HarmonyPatches/GlobalFPSCap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ static class GlobalFPSCap {
static bool isOculus = false;
static bool isOculusUserPresent = false;

public static void Init() {
//public static void Init() {
/*
* On VRMode Oculus, when you take off the headset the game ends up in an uncapped FPS state,
* this makes sure to apply an FPS cap when the headset is taken off
*/
if(!OVRPlugin.initialized)
/*if(!OVRPlugin.initialized)
return;
isOculus = true;
Expand All @@ -40,7 +40,7 @@ public static void Init() {
System.Threading.Thread.Sleep(isOculusUserPresent ? 2000 : 500);
}
});
}
}*/

public static XRDisplaySubsystem GetActiveVrDevice() {
var xrDisplaySubsystems = new List<XRDisplaySubsystem>();
Expand Down
2 changes: 1 addition & 1 deletion Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void OnApplicationStart() {
harmony.PatchAll(Assembly.GetExecutingAssembly());

MovementScriptManager.LoadMovementScripts();
GlobalFPSCap.Init();
//GlobalFPSCap.Init();

SceneManager.activeSceneChanged += SceneUtil.OnActiveSceneChanged;

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "Camera2",
"name": "Camera2",
"author": "Kinsi55",
"version": "0.6.101",
"version": "0.6.102",
"description": "If Camera Plus is so good, why is there no Camera Plus 2?",
"gameVersion": "1.20.0",
"dependsOn": {
Expand Down

0 comments on commit 2a7f958

Please sign in to comment.