mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-15 12:53:51 +02:00
v2019.08.21.1
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
using CefSharp;
|
||||
using CefSharp.OffScreen;
|
||||
using SharpDX.Direct3D11;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Threading;
|
||||
|
||||
@@ -52,7 +53,7 @@ namespace VRCX
|
||||
{
|
||||
var context = m_Texture.Device.ImmediateContext;
|
||||
var box = context.MapSubresource(m_Texture, 0, MapMode.WriteDiscard, MapFlags.None);
|
||||
if (!box.IsEmpty)
|
||||
if (box.DataPointer != IntPtr.Zero)
|
||||
{
|
||||
if (box.RowPitch == H.Width * 4)
|
||||
{
|
||||
|
||||
@@ -61,10 +61,7 @@ namespace VRCX
|
||||
client = null;
|
||||
}
|
||||
}
|
||||
if (client != null)
|
||||
{
|
||||
client.Dispose();
|
||||
}
|
||||
client?.Dispose();
|
||||
})
|
||||
{
|
||||
IsBackground = true
|
||||
|
||||
@@ -63,11 +63,11 @@ namespace VRCX
|
||||
if (di.Exists)
|
||||
{
|
||||
var files = di.GetFiles("output_log_*.txt", SearchOption.TopDirectoryOnly);
|
||||
Array.Sort(files, (A, B) => A.CreationTime.CompareTo(B.CreationTime));
|
||||
var bias = DateTime.Now.AddMinutes(-5d);
|
||||
Array.Sort(files, (A, B) => A.CreationTimeUtc.CompareTo(B.CreationTimeUtc));
|
||||
var bias = DateTime.UtcNow.AddMinutes(-5d);
|
||||
foreach (var fi in files)
|
||||
{
|
||||
if (bias.CompareTo(fi.LastWriteTime) <= 0)
|
||||
if (bias.CompareTo(fi.LastWriteTimeUtc) <= 0)
|
||||
{
|
||||
fi.Refresh();
|
||||
}
|
||||
|
||||
@@ -58,9 +58,9 @@ namespace VRCX
|
||||
{
|
||||
if (m_Storage.Count > 0)
|
||||
{
|
||||
m_Storage.Clear();
|
||||
m_Dirty = true;
|
||||
}
|
||||
m_Storage.Clear();
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
14
VRCXVR.cs
14
VRCXVR.cs
@@ -98,13 +98,13 @@ namespace VRCX
|
||||
var system = OpenVR.System;
|
||||
if (system == null)
|
||||
{
|
||||
if (DateTime.Now.CompareTo(nextInit) <= 0)
|
||||
if (DateTime.UtcNow.CompareTo(nextInit) <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var _err = EVRInitError.None;
|
||||
system = OpenVR.Init(ref _err, EVRApplicationType.VRApplication_Overlay);
|
||||
nextInit = DateTime.Now.AddSeconds(5);
|
||||
nextInit = DateTime.UtcNow.AddSeconds(5);
|
||||
if (system == null)
|
||||
{
|
||||
continue;
|
||||
@@ -118,22 +118,22 @@ namespace VRCX
|
||||
{
|
||||
active = false;
|
||||
OpenVR.Shutdown();
|
||||
nextInit = DateTime.Now.AddSeconds(10);
|
||||
nextInit = DateTime.UtcNow.AddSeconds(10);
|
||||
system = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (system != null)
|
||||
{
|
||||
if (DateTime.Now.CompareTo(nextDeviceUpdate) >= 0)
|
||||
if (DateTime.UtcNow.CompareTo(nextDeviceUpdate) >= 0)
|
||||
{
|
||||
overlayIndex = OpenVR.k_unTrackedDeviceIndexInvalid;
|
||||
UpdateDevices(system, ref overlayIndex);
|
||||
if (overlayIndex != OpenVR.k_unTrackedDeviceIndexInvalid)
|
||||
{
|
||||
nextOverlay = DateTime.Now.AddSeconds(10);
|
||||
nextOverlay = DateTime.UtcNow.AddSeconds(10);
|
||||
}
|
||||
nextDeviceUpdate = DateTime.Now.AddSeconds(0.1);
|
||||
nextDeviceUpdate = DateTime.UtcNow.AddSeconds(0.1);
|
||||
}
|
||||
var overlay = OpenVR.Overlay;
|
||||
if (overlay != null)
|
||||
@@ -457,7 +457,7 @@ namespace VRCX
|
||||
}
|
||||
|
||||
if (!dashboardVisible &&
|
||||
DateTime.Now.CompareTo(nextOverlay) <= 0)
|
||||
DateTime.UtcNow.CompareTo(nextOverlay) <= 0)
|
||||
{
|
||||
var texture = new Texture_t
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user