v2019.08.21.1

This commit is contained in:
pypy
2019-08-21 01:34:03 +09:00
parent e225c2290d
commit 800a649d18
5 changed files with 14 additions and 16 deletions

View File

@@ -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)
{

View File

@@ -61,10 +61,7 @@ namespace VRCX
client = null;
}
}
if (client != null)
{
client.Dispose();
}
client?.Dispose();
})
{
IsBackground = true

View File

@@ -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();
}

View File

@@ -58,9 +58,9 @@ namespace VRCX
{
if (m_Storage.Count > 0)
{
m_Storage.Clear();
m_Dirty = true;
}
m_Storage.Clear();
}
finally
{

View File

@@ -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
{