From 81affe9377284d337a25891f6e84e7e977c5b21b Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Tue, 3 Jan 2023 12:44:56 -0600 Subject: [PATCH] add clamp to aspect ratio --- MenuScalePatch/HarmonyPatches.cs | 3 ++- MenuScalePatch/MenuScalePatch.csproj | 9 --------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/MenuScalePatch/HarmonyPatches.cs b/MenuScalePatch/HarmonyPatches.cs index 3cfee9d..189e34a 100644 --- a/MenuScalePatch/HarmonyPatches.cs +++ b/MenuScalePatch/HarmonyPatches.cs @@ -55,7 +55,8 @@ internal class HarmonyPatches { //this is called once a second, so ill fix their dumb aspect ratio shit float ratio = (float)Screen.width / (float)Screen.height; - MSP_MenuInfo.AspectRatio = 1.7777779f / ratio; + float clamp = Mathf.Clamp(ratio, 0f, 1.8f); + MSP_MenuInfo.AspectRatio = 1.7777779f / clamp; __runOriginal = false; } diff --git a/MenuScalePatch/MenuScalePatch.csproj b/MenuScalePatch/MenuScalePatch.csproj index bb32f6d..655b3bd 100644 --- a/MenuScalePatch/MenuScalePatch.csproj +++ b/MenuScalePatch/MenuScalePatch.csproj @@ -18,24 +18,15 @@ ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Cohtml.Runtime.dll - - ..\..\Giamoz\Giamoz\bin\Debug\net472\Giamoz.dll - C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\MelonLoader\MelonLoader.dll - - C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\SteamVR.dll - C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.InputLegacyModule.dll - - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.PhysicsModule.dll -