From aeb2f9067b469a3dbce288640736be3a4fc6fdc0 Mon Sep 17 00:00:00 2001 From: Zephyr <67527746+zeph-yr@users.noreply.github.com> Date: Sat, 13 May 2023 01:05:39 +0800 Subject: [PATCH 1/3] Fix for console error in oculus mode --- HarmonyPatches/GlobalFPSCap.cs | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HarmonyPatches/GlobalFPSCap.cs b/HarmonyPatches/GlobalFPSCap.cs index c5c6de6..9bbde92 100644 --- a/HarmonyPatches/GlobalFPSCap.cs +++ b/HarmonyPatches/GlobalFPSCap.cs @@ -19,8 +19,8 @@ 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) - return; + //if(!OVRPlugin.initialized) + // return; isOculus = true; diff --git a/manifest.json b/manifest.json index e2c22a9..44d48c9 100644 --- a/manifest.json +++ b/manifest.json @@ -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": { From 960eb28b00c1a5e4130776a5459b27257618e946 Mon Sep 17 00:00:00 2001 From: Zephyr <67527746+zeph-yr@users.noreply.github.com> Date: Sat, 13 May 2023 11:22:38 +0800 Subject: [PATCH 2/3] Comment out GlobalFPSCap.Init() --- Camera2.sln | 28 ++++++++++++++++++++++++++++ HarmonyPatches/GlobalFPSCap.cs | 8 ++++---- Plugin.cs | 2 +- 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 Camera2.sln diff --git a/Camera2.sln b/Camera2.sln new file mode 100644 index 0000000..c274ca6 --- /dev/null +++ b/Camera2.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33027.164 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Camera2", "Camera2.csproj", "{0EDA1448-846B-4FA2-A39A-81001287B688}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Dev|x64 = Dev|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0EDA1448-846B-4FA2-A39A-81001287B688}.Debug|x64.ActiveCfg = Debug|x64 + {0EDA1448-846B-4FA2-A39A-81001287B688}.Debug|x64.Build.0 = Debug|x64 + {0EDA1448-846B-4FA2-A39A-81001287B688}.Dev|x64.ActiveCfg = Dev|x64 + {0EDA1448-846B-4FA2-A39A-81001287B688}.Dev|x64.Build.0 = Dev|x64 + {0EDA1448-846B-4FA2-A39A-81001287B688}.Release|x64.ActiveCfg = Release|x64 + {0EDA1448-846B-4FA2-A39A-81001287B688}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DDA3DAEA-3164-44FC-A360-B02F37E438BA} + EndGlobalSection +EndGlobal diff --git a/HarmonyPatches/GlobalFPSCap.cs b/HarmonyPatches/GlobalFPSCap.cs index 9bbde92..ada658c 100644 --- a/HarmonyPatches/GlobalFPSCap.cs +++ b/HarmonyPatches/GlobalFPSCap.cs @@ -14,13 +14,13 @@ 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) - // return; + /*if(!OVRPlugin.initialized) + return; isOculus = true; @@ -40,7 +40,7 @@ public static void Init() { System.Threading.Thread.Sleep(isOculusUserPresent ? 2000 : 500); } }); - } + }*/ public static XRDisplaySubsystem GetActiveVrDevice() { var xrDisplaySubsystems = new List(); diff --git a/Plugin.cs b/Plugin.cs index e0b7ada..8417dd3 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -67,7 +67,7 @@ public void OnApplicationStart() { harmony.PatchAll(Assembly.GetExecutingAssembly()); MovementScriptManager.LoadMovementScripts(); - GlobalFPSCap.Init(); + //GlobalFPSCap.Init(); SceneManager.activeSceneChanged += SceneUtil.OnActiveSceneChanged; From b31541e5ef2b02739c97a912e9b06afb03a03e45 Mon Sep 17 00:00:00 2001 From: Zephyr <67527746+zeph-yr@users.noreply.github.com> Date: Sat, 13 May 2023 11:53:43 +0800 Subject: [PATCH 3/3] Delete Camera2.sln Oops, didn't mean to put this in the PR --- Camera2.sln | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 Camera2.sln diff --git a/Camera2.sln b/Camera2.sln deleted file mode 100644 index c274ca6..0000000 --- a/Camera2.sln +++ /dev/null @@ -1,28 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.33027.164 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Camera2", "Camera2.csproj", "{0EDA1448-846B-4FA2-A39A-81001287B688}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Dev|x64 = Dev|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0EDA1448-846B-4FA2-A39A-81001287B688}.Debug|x64.ActiveCfg = Debug|x64 - {0EDA1448-846B-4FA2-A39A-81001287B688}.Debug|x64.Build.0 = Debug|x64 - {0EDA1448-846B-4FA2-A39A-81001287B688}.Dev|x64.ActiveCfg = Dev|x64 - {0EDA1448-846B-4FA2-A39A-81001287B688}.Dev|x64.Build.0 = Dev|x64 - {0EDA1448-846B-4FA2-A39A-81001287B688}.Release|x64.ActiveCfg = Release|x64 - {0EDA1448-846B-4FA2-A39A-81001287B688}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {DDA3DAEA-3164-44FC-A360-B02F37E438BA} - EndGlobalSection -EndGlobal