mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Only apply font change when running under wine
This commit is contained in:
@@ -603,5 +603,10 @@ namespace VRCX
|
||||
|
||||
return await ImageCache.SaveImageToFile(url, filePath);
|
||||
}
|
||||
|
||||
public bool IsRunningUnderWine()
|
||||
{
|
||||
return Wine.GetIfWine();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,5 +80,10 @@ namespace VRCX
|
||||
output = filePath;
|
||||
return output;
|
||||
}
|
||||
|
||||
public bool IsRunningUnderWine()
|
||||
{
|
||||
return Wine.GetIfWine();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,11 @@ namespace VRCX
|
||||
{
|
||||
var isGameRunning = false;
|
||||
var isSteamVRRunning = false;
|
||||
|
||||
if (ProcessMonitor.Instance.IsProcessRunning("VRChat"))
|
||||
{
|
||||
isGameRunning = true;
|
||||
}
|
||||
|
||||
if (Wine.GetIfWine())
|
||||
{
|
||||
@@ -39,13 +44,6 @@ namespace VRCX
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ProcessMonitor.Instance.IsProcessRunning("VRChat"))
|
||||
{
|
||||
isGameRunning = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (ProcessMonitor.Instance.IsProcessRunning("vrserver"))
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@ using CefSharp.Structs;
|
||||
using SharpDX.Direct3D11;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using NLog;
|
||||
using SharpDX.Direct3D;
|
||||
using SharpDX.Mathematics.Interop;
|
||||
using Range = CefSharp.Structs.Range;
|
||||
@@ -24,6 +25,8 @@ namespace VRCX
|
||||
private DeviceMultithread _deviceMultithread;
|
||||
private Query _query;
|
||||
private Texture2D _renderTarget;
|
||||
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public OffScreenBrowser(string address, int width, int height)
|
||||
: base(address, automaticallyCreateBrowser: false)
|
||||
@@ -101,11 +104,20 @@ namespace VRCX
|
||||
|
||||
if (_device == null)
|
||||
return;
|
||||
|
||||
using Texture2D cefTexture = _device1.OpenSharedResource1<Texture2D>(paintInfo.SharedTextureHandle);
|
||||
_device.ImmediateContext.CopyResource(cefTexture, _renderTarget);
|
||||
_device.ImmediateContext.End(_query);
|
||||
_device.ImmediateContext.Flush();
|
||||
|
||||
try
|
||||
{
|
||||
using Texture2D cefTexture = _device1.OpenSharedResource1<Texture2D>(paintInfo.SharedTextureHandle);
|
||||
_device.ImmediateContext.CopyResource(cefTexture, _renderTarget);
|
||||
_device.ImmediateContext.End(_query);
|
||||
_device.ImmediateContext.Flush();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.Error(e);
|
||||
_device = null;
|
||||
return;
|
||||
}
|
||||
|
||||
RawBool q = _device.ImmediateContext.GetData<RawBool>(_query, AsynchronousFlags.DoNotFlush);
|
||||
|
||||
|
||||
@@ -837,16 +837,16 @@ namespace VRCX
|
||||
public override void ExecuteVrFeedFunction(string function, string json)
|
||||
{
|
||||
if (_wristOverlay == null) return;
|
||||
if (_wristOverlay.IsLoading)
|
||||
Restart();
|
||||
// if (_wristOverlay.IsLoading)
|
||||
// Restart();
|
||||
_wristOverlay.ExecuteScriptAsync($"$app.{function}", json);
|
||||
}
|
||||
|
||||
public override void ExecuteVrOverlayFunction(string function, string json)
|
||||
{
|
||||
if (_hmdOverlay == null) return;
|
||||
if (_hmdOverlay.IsLoading)
|
||||
Restart();
|
||||
// if (_hmdOverlay.IsLoading)
|
||||
// Restart();
|
||||
_hmdOverlay.ExecuteScriptAsync($"$app.{function}", json);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user