Skip to content

Commit

Permalink
Only mask 3 in studio
Browse files Browse the repository at this point in the history
  • Loading branch information
Keelhauled committed Aug 12, 2020
1 parent cefae15 commit f0c7f97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions src/CameraFrameMask.Koikatu/CameraFrameMask.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BepInEx;
using BepInEx;
using BepInEx.Harmony;
using BepInEx.Logging;
using HarmonyLib;
Expand All @@ -20,6 +16,7 @@ public class CameraFrameMask : BaseUnityPlugin
private static Harmony harmony;
private static new ManualLogSource Logger;
private static MaskComponent maskComponent;
private static bool inStudio = Paths.ProcessName == "CharaStudio";

private void Awake()
{
Expand All @@ -41,7 +38,7 @@ private void Awake()
[HarmonyPrefix, HarmonyPatch(typeof(ChaControl), nameof(ChaControl.ChangeCoordinateType), typeof(ChaFileDefine.CoordinateType), typeof(bool))]
private static void ChangeCoordinateTypePrefix()
{
MaskFrames(3);
MaskFrames(inStudio ? 3 : 1);
}

public static void MaskFrames(int count)
Expand Down
2 changes: 1 addition & 1 deletion src/CameraFrameMask.Koikatu/MaskComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ private void Start()
lastHeight = Screen.height;
lastFrame = RenderTexture.GetTemporary(lastWidth, lastHeight);
}

private void OnDestroy()
{
RenderTexture.ReleaseTemporary(lastFrame);
Expand Down

0 comments on commit f0c7f97

Please sign in to comment.