mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 14:26:06 +02:00
Merge pull request #433 from Myrkie/master
(Minor) Added argument to set VROverlay GPU to index
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ namespace VRCX
|
|||||||
public static string ConfigLocation;
|
public static string ConfigLocation;
|
||||||
public static string Version { get; private set; }
|
public static string Version { get; private set; }
|
||||||
public static bool LaunchDebug;
|
public static bool LaunchDebug;
|
||||||
|
public static bool GPUFix;
|
||||||
static Program()
|
static Program()
|
||||||
{
|
{
|
||||||
BaseDirectory = AppDomain.CurrentDomain.BaseDirectory;
|
BaseDirectory = AppDomain.CurrentDomain.BaseDirectory;
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ namespace VRCX
|
|||||||
|
|
||||||
foreach (string arg in args)
|
foreach (string arg in args)
|
||||||
{
|
{
|
||||||
|
if (arg.Contains("--gpufix")) Program.GPUFix = true;
|
||||||
if (arg.Length > 12 && arg.Substring(0, 12) == "/uri=vrcx://")
|
if (arg.Length > 12 && arg.Substring(0, 12) == "/uri=vrcx://")
|
||||||
LaunchCommand = arg.Substring(12);
|
LaunchCommand = arg.Substring(12);
|
||||||
|
|
||||||
|
|||||||
@@ -88,11 +88,13 @@ namespace VRCX
|
|||||||
|
|
||||||
// REMOVE THIS
|
// REMOVE THIS
|
||||||
// nextOverlay = DateTime.MaxValue;
|
// nextOverlay = DateTime.MaxValue;
|
||||||
|
// https://stackoverflow.com/questions/38312597/how-to-choose-a-specific-graphics-device-in-sharpdx-directx-11/38596725#38596725
|
||||||
|
Factory f = new Factory1();
|
||||||
|
Adapter a = f.GetAdapter(1);
|
||||||
|
|
||||||
|
DeviceCreationFlags flags = DeviceCreationFlags.BgraSupport;
|
||||||
|
|
||||||
_device = new Device(
|
_device = Program.GPUFix ? new Device(a, flags) : new Device(DriverType.Hardware, DeviceCreationFlags.SingleThreaded | DeviceCreationFlags.BgraSupport);
|
||||||
DriverType.Hardware,
|
|
||||||
DeviceCreationFlags.SingleThreaded | DeviceCreationFlags.BgraSupport
|
|
||||||
);
|
|
||||||
|
|
||||||
_texture1 = new Texture2D(
|
_texture1 = new Texture2D(
|
||||||
_device,
|
_device,
|
||||||
|
|||||||
Reference in New Issue
Block a user