1
0
mirror of synced 2025-01-18 23:34:04 +01:00

Added desktop capture to the config file

This commit is contained in:
FizzyApple12 2022-06-07 21:33:50 -04:00
parent ccae556f92
commit 580a20dd45
4 changed files with 17 additions and 10 deletions

View File

@ -960,7 +960,6 @@ MonoBehaviour:
isToggle: 0
doesBeep: 1
isOn: 0
camera: {fileID: 1740661838}
audioSrc: {fileID: 25651916}
--- !u!65 &61320021
BoxCollider:
@ -1874,7 +1873,6 @@ MonoBehaviour:
isToggle: 0
doesBeep: 0
isOn: 0
camera: {fileID: 1740661838}
audioSrc: {fileID: 25651916}
--- !u!65 &113329742
BoxCollider:
@ -2087,7 +2085,6 @@ MonoBehaviour:
isToggle: 0
doesBeep: 1
isOn: 0
camera: {fileID: 0}
audioSrc: {fileID: 25651916}
--- !u!114 &122803494
MonoBehaviour:
@ -2140,7 +2137,7 @@ MonoBehaviour:
childWindowZDistance: 0.02
partialWindowTitle_: Mercury
desktopIndex_: 0
captureMode: 1
captureMode: 3
capturePriority: 0
captureRequestTiming: 0
captureFrameRate: 60
@ -2786,7 +2783,6 @@ MonoBehaviour:
isToggle: 0
doesBeep: 1
isOn: 0
camera: {fileID: 0}
audioSrc: {fileID: 25651916}
--- !u!1 &197423513 stripped
GameObject:
@ -8985,7 +8981,6 @@ MonoBehaviour:
isToggle: 0
doesBeep: 1
isOn: 0
camera: {fileID: 1740661838}
audioSrc: {fileID: 25651916}
--- !u!65 &801700137
BoxCollider:
@ -10156,7 +10151,6 @@ MonoBehaviour:
isToggle: 0
doesBeep: 1
isOn: 0
camera: {fileID: 0}
audioSrc: {fileID: 25651916}
--- !u!65 &904545307
BoxCollider:
@ -13616,7 +13610,6 @@ MonoBehaviour:
isToggle: 0
doesBeep: 1
isOn: 0
camera: {fileID: 0}
audioSrc: {fileID: 25651916}
--- !u!65 &1235613586
BoxCollider:
@ -28316,7 +28309,6 @@ MonoBehaviour:
isToggle: 0
doesBeep: 1
isOn: 0
camera: {fileID: 0}
audioSrc: {fileID: 25651916}
--- !u!65 &1879586939
BoxCollider:

View File

@ -23,7 +23,7 @@ public class PanelButton : MonoBehaviour
private int _insideColliderCount = 0;
private Renderer cr;
public GameObject camera;
//public GameObject camera; // just generating warnings lmao
public AudioSource audioSrc;
void Start()

View File

@ -26,5 +26,18 @@ public class UwcConfigurator : MonoBehaviour {
uwcWindowTexture.captureFrameRate = JsonConfiguration.GetInt("CaptureFramerate");
else
JsonConfiguration.SetInt("CaptureFramerate", uwcWindowTexture.captureFrameRate);
if (!JsonConfiguration.HasKey("CaptureDesktopNumber"))
JsonConfiguration.SetInt("CaptureDesktopNumber", 0);
if (JsonConfiguration.HasKey("CaptureDesktop") && JsonConfiguration.GetBoolean("CaptureDesktop"))
SwitchToDesktopCapture();
else
JsonConfiguration.SetBoolean("CaptureDesktop", false);
}
void SwitchToDesktopCapture() {
uwcWindowTexture.type = WindowTextureType.Desktop;
uwcWindowTexture.desktopIndex = JsonConfiguration.GetInt("CaptureDesktopNumber");
}
}

View File

@ -31,6 +31,8 @@ A ``config.json`` is automatically created in the WACVR root on startup
- ``2``: Windows Graphics Capture
- ``3``: Automatic (Recommended, Default)
- ``CaptureFramerate``: the framerate to capture the game at (Default: 60)
- ``CaptureDesktop``: whether to capture the specific window or a full monitor
- ``CaptureDesktopNumber``: the monitor to capture if you're capturing a full monitor
## Why this repo now?