mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 06:13:52 +02:00
Fix overlay fps, add capacity hard cap
This commit is contained in:
@@ -212,14 +212,9 @@ namespace VRCX
|
||||
}
|
||||
}
|
||||
|
||||
public void StartVR()
|
||||
public void SetVR(bool active, bool hmdOverlay, bool wristOverlay)
|
||||
{
|
||||
VRCXVR.Instance.SetActive(true);
|
||||
}
|
||||
|
||||
public void StopVR()
|
||||
{
|
||||
VRCXVR.Instance.SetActive(false);
|
||||
VRCXVR.Instance.SetActive(active, hmdOverlay, wristOverlay);
|
||||
}
|
||||
|
||||
public void RefreshVR()
|
||||
|
||||
15
VRCXVR.cs
15
VRCXVR.cs
@@ -37,6 +37,8 @@ namespace VRCX
|
||||
public static OffScreenBrowser _browser1;
|
||||
public static OffScreenBrowser _browser2;
|
||||
private bool _active;
|
||||
private bool _hmdOverlayActive;
|
||||
private bool _wristOverlayActive;
|
||||
|
||||
static VRCXVR()
|
||||
{
|
||||
@@ -136,14 +138,13 @@ namespace VRCX
|
||||
|
||||
while (_thread != null)
|
||||
{
|
||||
if ("true".Equals(SharedVariable.Instance.Get("config:vrcx_overlaywrist")))
|
||||
{
|
||||
if (_wristOverlayActive)
|
||||
_browser1.RenderToTexture(_texture1);
|
||||
}
|
||||
_browser2.RenderToTexture(_texture2);
|
||||
if (_hmdOverlayActive)
|
||||
_browser2.RenderToTexture(_texture2);
|
||||
try
|
||||
{
|
||||
Thread.Sleep(16);
|
||||
Thread.Sleep(32);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -244,9 +245,11 @@ namespace VRCX
|
||||
|
||||
}
|
||||
|
||||
public void SetActive(bool active)
|
||||
public void SetActive(bool active, bool hmdOverlay, bool wristOverlay)
|
||||
{
|
||||
_active = active;
|
||||
_hmdOverlayActive = hmdOverlay;
|
||||
_wristOverlayActive = wristOverlay;
|
||||
}
|
||||
|
||||
public void Refresh()
|
||||
|
||||
@@ -9986,9 +9986,14 @@ speechSynthesis.getVoices();
|
||||
isSteamVRRunning &&
|
||||
(isGameRunning || this.openVRAlways)
|
||||
) {
|
||||
AppApi.StartVR();
|
||||
var hmdOverlay = false;
|
||||
if (this.overlayNotifications || this.progressPie) {
|
||||
hmdOverlay = true;
|
||||
}
|
||||
// active, hmdOverlay, wristOverlay
|
||||
AppApi.SetVR(true, hmdOverlay, this.overlayWrist);
|
||||
} else {
|
||||
AppApi.StopVR();
|
||||
AppApi.SetVR(false, false, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1407,7 +1407,7 @@ html
|
||||
div.
|
||||
#[i.el-icon-user] Public {{ worldDialog.ref.publicOccupants | commaNumber }}
|
||||
#[i.el-icon-user-solid(style="margin-left:10px")] Private {{ worldDialog.ref.privateOccupants | commaNumber }}
|
||||
#[i.el-icon-check(style="margin-left:10px")] Capacity {{ worldDialog.ref.capacity | commaNumber }}
|
||||
#[i.el-icon-check(style="margin-left:10px")] Capacity {{ worldDialog.ref.capacity | commaNumber }} ({{ worldDialog.ref.capacity * 2 | commaNumber }})
|
||||
div(v-for="room in worldDialog.rooms" :key="room.id")
|
||||
div(style="margin:5px 0")
|
||||
span.x-link(@click="showLaunchDialog(room.$location.tag)")
|
||||
@@ -1458,7 +1458,8 @@ html
|
||||
.x-friend-item(style="cursor:default")
|
||||
.detail
|
||||
span.name Favorites
|
||||
span.extra {{ worldDialog.ref.favorites | commaNumber }} ({{ Math.round(((worldDialog.ref.favorites - worldDialog.ref.visits) / worldDialog.ref.visits * 100 + 100) * 100) / 100 }}%)
|
||||
span.extra {{ worldDialog.ref.favorites | commaNumber }}
|
||||
| #[template(v-if="worldDialog.ref.favorites > 0") ({{ Math.round(((worldDialog.ref.favorites - worldDialog.ref.visits) / worldDialog.ref.visits * 100 + 100) * 100) / 100 }}%)]
|
||||
.x-friend-item(style="cursor:default")
|
||||
.detail
|
||||
span.name Visits
|
||||
@@ -1466,7 +1467,7 @@ html
|
||||
.x-friend-item(style="cursor:default")
|
||||
.detail
|
||||
span.name Capacity
|
||||
span.extra(v-text="worldDialog.ref.capacity")
|
||||
span.extra {{ worldDialog.ref.capacity | commaNumber }} ({{ worldDialog.ref.capacity * 2 | commaNumber }})
|
||||
.x-friend-item(style="cursor:default")
|
||||
.detail
|
||||
span.name Heat
|
||||
|
||||
Reference in New Issue
Block a user