Folder cs files

This commit is contained in:
Natsumi
2023-10-11 20:36:41 +13:00
parent 634f465927
commit 6cfadfa67f
53 changed files with 192 additions and 147 deletions

View File

@@ -719,9 +719,11 @@ namespace VRCX
/// </summary>
/// <param name="key">The name of the key to set.</param>
/// <param name="value">The value to set for the specified key.</param>
/// <param name="typeInt">The RegistryValueKind type.</param>
/// <returns>True if the key was successfully set, false otherwise.</returns>
public bool SetVRChatRegistryKey(string key, string value)
public bool SetVRChatRegistryKey(string key, object value, int typeInt)
{
var type = (RegistryValueKind)typeInt;
uint hash = 5381;
foreach (var c in key)
hash = (hash * 33) ^ c;
@@ -731,13 +733,12 @@ namespace VRCX
{
if (regKey?.GetValue(keyName) == null)
return false;
var type = regKey.GetValueKind(keyName);
object setValue = null;
switch (type)
{
case RegistryValueKind.Binary:
setValue = Encoding.ASCII.GetBytes(value);
setValue = Encoding.ASCII.GetBytes(value.ToString());
break;
case RegistryValueKind.DWord:

View File

@@ -10,7 +10,7 @@ using CefSharp.Enums;
namespace VRCX
{
public class NoopDragHandler : IDragHandler
public class CefNoopDragHandler : IDragHandler
{
bool IDragHandler.OnDragEnter(IWebBrowser chromiumWebBrowser, IBrowser browser, IDragData dragData, DragOperationsMask mask)
{

View File

@@ -1045,6 +1045,16 @@ public struct IVROverlay
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayCurvature GetOverlayCurvature;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayPreCurvePitch(ulong ulOverlayHandle, float fRadians);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayPreCurvePitch SetOverlayPreCurvePitch;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayPreCurvePitch(ulong ulOverlayHandle, ref float pfRadians);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayPreCurvePitch GetOverlayPreCurvePitch;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTextureColorSpace(ulong ulOverlayHandle, EColorSpace eTextureColorSpace);
[MarshalAs(UnmanagedType.FunctionPtr)]
@@ -1100,16 +1110,6 @@ public struct IVROverlay
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTransformTrackedDeviceComponent GetOverlayTransformTrackedDeviceComponent;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _GetOverlayTransformOverlayRelative(ulong ulOverlayHandle, ref ulong ulOverlayHandleParent, ref HmdMatrix34_t pmatParentOverlayToOverlayTransform);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetOverlayTransformOverlayRelative GetOverlayTransformOverlayRelative;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTransformOverlayRelative(ulong ulOverlayHandle, ulong ulOverlayHandleParent, ref HmdMatrix34_t pmatParentOverlayToOverlayTransform);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _SetOverlayTransformOverlayRelative SetOverlayTransformOverlayRelative;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _SetOverlayTransformCursor(ulong ulCursorOverlayHandle, ref HmdVector2_t pvHotspot);
[MarshalAs(UnmanagedType.FunctionPtr)]
@@ -1145,6 +1145,11 @@ public struct IVROverlay
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _GetTransformForOverlayCoordinates GetTransformForOverlayCoordinates;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EVROverlayError _WaitFrameSync(uint nTimeoutMs);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _WaitFrameSync WaitFrameSync;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate bool _PollNextOverlayEvent(ulong ulOverlayHandle, ref VREvent_t pEvent, uint uncbVREvent);
[MarshalAs(UnmanagedType.FunctionPtr)]
@@ -1951,7 +1956,7 @@ public struct IVRPaths
public struct IVRBlockQueue
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal delegate EBlockQueueError _Create(ref ulong pulQueueHandle, IntPtr pchPath, uint unBlockDataSize, uint unBlockHeaderSize, uint unBlockCount);
internal delegate EBlockQueueError _Create(ref ulong pulQueueHandle, IntPtr pchPath, uint unBlockDataSize, uint unBlockHeaderSize, uint unBlockCount, uint unFlags);
[MarshalAs(UnmanagedType.FunctionPtr)]
internal _Create Create;
@@ -3235,6 +3240,17 @@ public class CVROverlay
EVROverlayError result = FnTable.GetOverlayCurvature(ulOverlayHandle,ref pfCurvature);
return result;
}
public EVROverlayError SetOverlayPreCurvePitch(ulong ulOverlayHandle,float fRadians)
{
EVROverlayError result = FnTable.SetOverlayPreCurvePitch(ulOverlayHandle,fRadians);
return result;
}
public EVROverlayError GetOverlayPreCurvePitch(ulong ulOverlayHandle,ref float pfRadians)
{
pfRadians = 0;
EVROverlayError result = FnTable.GetOverlayPreCurvePitch(ulOverlayHandle,ref pfRadians);
return result;
}
public EVROverlayError SetOverlayTextureColorSpace(ulong ulOverlayHandle,EColorSpace eTextureColorSpace)
{
EVROverlayError result = FnTable.SetOverlayTextureColorSpace(ulOverlayHandle,eTextureColorSpace);
@@ -3294,17 +3310,6 @@ public class CVROverlay
EVROverlayError result = FnTable.GetOverlayTransformTrackedDeviceComponent(ulOverlayHandle,ref punDeviceIndex,pchComponentName,unComponentNameSize);
return result;
}
public EVROverlayError GetOverlayTransformOverlayRelative(ulong ulOverlayHandle,ref ulong ulOverlayHandleParent,ref HmdMatrix34_t pmatParentOverlayToOverlayTransform)
{
ulOverlayHandleParent = 0;
EVROverlayError result = FnTable.GetOverlayTransformOverlayRelative(ulOverlayHandle,ref ulOverlayHandleParent,ref pmatParentOverlayToOverlayTransform);
return result;
}
public EVROverlayError SetOverlayTransformOverlayRelative(ulong ulOverlayHandle,ulong ulOverlayHandleParent,ref HmdMatrix34_t pmatParentOverlayToOverlayTransform)
{
EVROverlayError result = FnTable.SetOverlayTransformOverlayRelative(ulOverlayHandle,ulOverlayHandleParent,ref pmatParentOverlayToOverlayTransform);
return result;
}
public EVROverlayError SetOverlayTransformCursor(ulong ulCursorOverlayHandle,ref HmdVector2_t pvHotspot)
{
EVROverlayError result = FnTable.SetOverlayTransformCursor(ulCursorOverlayHandle,ref pvHotspot);
@@ -3340,6 +3345,11 @@ public class CVROverlay
EVROverlayError result = FnTable.GetTransformForOverlayCoordinates(ulOverlayHandle,eTrackingOrigin,coordinatesInOverlay,ref pmatTransform);
return result;
}
public EVROverlayError WaitFrameSync(uint nTimeoutMs)
{
EVROverlayError result = FnTable.WaitFrameSync(nTimeoutMs);
return result;
}
// This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
// originally mis-compiled with the wrong packing for Linux and OSX.
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
@@ -4425,11 +4435,11 @@ public class CVRBlockQueue
{
FnTable = (IVRBlockQueue)Marshal.PtrToStructure(pInterface, typeof(IVRBlockQueue));
}
public EBlockQueueError Create(ref ulong pulQueueHandle,string pchPath,uint unBlockDataSize,uint unBlockHeaderSize,uint unBlockCount)
public EBlockQueueError Create(ref ulong pulQueueHandle,string pchPath,uint unBlockDataSize,uint unBlockHeaderSize,uint unBlockCount,uint unFlags)
{
pulQueueHandle = 0;
IntPtr pchPathUtf8 = Utils.ToUtf8(pchPath);
EBlockQueueError result = FnTable.Create(ref pulQueueHandle,pchPathUtf8,unBlockDataSize,unBlockHeaderSize,unBlockCount);
EBlockQueueError result = FnTable.Create(ref pulQueueHandle,pchPathUtf8,unBlockDataSize,unBlockHeaderSize,unBlockCount,unFlags);
Marshal.FreeHGlobal(pchPathUtf8);
return result;
}
@@ -4629,6 +4639,8 @@ public enum ETrackedDeviceProperty
Prop_ManufacturerSerialNumber_String = 1049,
Prop_ComputedSerialNumber_String = 1050,
Prop_EstimatedDeviceFirstUseTime_Int32 = 1051,
Prop_DevicePowerUsage_Float = 1052,
Prop_IgnoreMotionForStandby_Bool = 1053,
Prop_ReportsTimeSinceVSync_Bool = 2000,
Prop_SecondsFromVsyncToPhotons_Float = 2001,
Prop_DisplayFrequency_Float = 2002,
@@ -4717,10 +4729,21 @@ public enum ETrackedDeviceProperty
Prop_CameraExposureTime_Float = 2088,
Prop_CameraGlobalGain_Float = 2089,
Prop_DashboardScale_Float = 2091,
Prop_PeerButtonInfo_String = 2092,
Prop_Hmd_SupportsHDR10_Bool = 2093,
Prop_Hmd_EnableParallelRenderCameras_Bool = 2094,
Prop_DriverProvidedChaperoneJson_String = 2095,
Prop_IpdUIRangeMinMeters_Float = 2100,
Prop_IpdUIRangeMaxMeters_Float = 2101,
Prop_Hmd_SupportsHDCP14LegacyCompat_Bool = 2102,
Prop_Hmd_SupportsMicMonitoring_Bool = 2103,
Prop_Hmd_SupportsDisplayPortTrainingMode_Bool = 2104,
Prop_Hmd_SupportsRoomViewDirect_Bool = 2105,
Prop_Hmd_SupportsAppThrottling_Bool = 2106,
Prop_Hmd_SupportsGpuBusMonitoring_Bool = 2107,
Prop_DSCVersion_Int32 = 2110,
Prop_DSCSliceCount_Int32 = 2111,
Prop_DSCBPPx16_Int32 = 2112,
Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200,
Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201,
Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202,
@@ -4817,6 +4840,7 @@ public enum EVRSubmitFlags
Submit_VulkanTextureWithArrayData = 64,
Submit_GlArrayTexture = 128,
Submit_Reserved2 = 32768,
Submit_Reserved3 = 65536,
}
public enum EVRState
{
@@ -4867,13 +4891,13 @@ public enum EVREventType
VREvent_InputFocusCaptured = 400,
VREvent_InputFocusReleased = 401,
VREvent_SceneApplicationChanged = 404,
VREvent_SceneFocusChanged = 405,
VREvent_InputFocusChanged = 406,
VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408,
VREvent_ActionBindingReloaded = 409,
VREvent_HideRenderModels = 410,
VREvent_ShowRenderModels = 411,
VREvent_SceneApplicationStateChanged = 412,
VREvent_SceneAppPipeDisconnected = 413,
VREvent_ConsoleOpened = 420,
VREvent_ConsoleClosed = 421,
VREvent_OverlayShown = 500,
@@ -4904,6 +4928,9 @@ public enum EVREventType
VREvent_ShowDevTools = 529,
VREvent_DesktopViewUpdating = 530,
VREvent_DesktopViewReady = 531,
VREvent_StartDashboard = 532,
VREvent_ElevatePrism = 533,
VREvent_OverlayClosed = 534,
VREvent_Notification_Shown = 600,
VREvent_Notification_Hidden = 601,
VREvent_Notification_BeginInteraction = 602,
@@ -4913,6 +4940,7 @@ public enum EVREventType
VREvent_QuitAcknowledged = 703,
VREvent_DriverRequestedQuit = 704,
VREvent_RestartRequested = 705,
VREvent_InvalidateSwapTextureSets = 706,
VREvent_ChaperoneDataHasChanged = 800,
VREvent_ChaperoneUniverseHasChanged = 801,
VREvent_ChaperoneTempDataHasChanged = 802,
@@ -4967,6 +4995,7 @@ public enum EVREventType
VREvent_Compositor_OutOfVideoMemory = 1417,
VREvent_Compositor_DisplayModeNotSupported = 1418,
VREvent_Compositor_StageOverrideReady = 1419,
VREvent_Compositor_RequestDisconnectReconnect = 1420,
VREvent_TrackedCamera_StartVideoStream = 1500,
VREvent_TrackedCamera_StopVideoStream = 1501,
VREvent_TrackedCamera_PauseVideoStream = 1502,
@@ -5027,6 +5056,8 @@ public enum EVRButtonId
k_EButton_IndexController_A = 2,
k_EButton_IndexController_B = 1,
k_EButton_IndexController_JoyStick = 35,
k_EButton_Reserved0 = 50,
k_EButton_Reserved1 = 51,
k_EButton_Max = 64,
}
public enum EVRMouseButton
@@ -5157,6 +5188,7 @@ public enum EVROverlayError
TextureAlreadyLocked = 31,
TextureLockCapacityReached = 32,
TextureNotLocked = 33,
TimedOut = 34,
}
public enum EVRApplicationType
{
@@ -5173,7 +5205,8 @@ public enum EVRApplicationType
VRApplication_OpenXRScene = 10,
VRApplication_OpenXROverlay = 11,
VRApplication_Prism = 12,
VRApplication_Max = 13,
VRApplication_RoomView = 13,
VRApplication_Max = 14,
}
public enum EVRFirmwareError
{
@@ -5260,8 +5293,20 @@ public enum EVRInitError
Init_PrismNeedsNewDrivers = 151,
Init_PrismStartupTimedOut = 152,
Init_CouldNotStartPrism = 153,
Init_CreateDriverDirectDeviceFailed = 154,
Init_PrismExitedUnexpectedly = 155,
Init_PrismClientInitFailed = 154,
Init_PrismClientStartFailed = 155,
Init_PrismExitedUnexpectedly = 156,
Init_BadLuid = 157,
Init_NoServerForAppContainer = 158,
Init_DuplicateBootstrapper = 159,
Init_VRDashboardServicePending = 160,
Init_VRDashboardServiceTimeout = 161,
Init_VRDashboardServiceStopped = 162,
Init_VRDashboardAlreadyStarted = 163,
Init_VRDashboardCopyFailed = 164,
Init_VRDashboardTokenFailure = 165,
Init_VRDashboardEnvironmentFailure = 166,
Init_VRDashboardPathFailure = 167,
Driver_Failed = 200,
Driver_Unknown = 201,
Driver_HmdUnknown = 202,
@@ -5275,6 +5320,8 @@ public enum EVRInitError
Driver_HmdDriverIdOutOfBounds = 211,
Driver_HmdDisplayMirrored = 212,
Driver_HmdDisplayNotFoundLaptop = 213,
Driver_PeerDriverNotInstalled = 214,
Driver_WirelessHmdNotConnected = 215,
IPC_ServerInitFailed = 300,
IPC_ConnectFailed = 301,
IPC_SharedStateInitFailed = 302,
@@ -5380,8 +5427,11 @@ public enum EVRInitError
Compositor_WindowInterfaceIsNull = 491,
Compositor_SystemLayerCreateInstance = 492,
Compositor_SystemLayerCreateSession = 493,
Compositor_CreateInverseDistortUVs = 494,
Compositor_CreateBackbufferDepth = 495,
VendorSpecific_UnableToConnectToOculusRuntime = 1000,
VendorSpecific_WindowsNotInDevMode = 1001,
VendorSpecific_OculusLinkNotEnabled = 1002,
VendorSpecific_HmdFound_CantOpenDevice = 1101,
VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102,
VendorSpecific_HmdFound_NoStoredConfig = 1103,
@@ -5396,6 +5446,7 @@ public enum EVRInitError
VendorSpecific_HmdFound_UserDataError = 1112,
VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
VendorSpecific_OculusRuntimeBadInstall = 1114,
VendorSpecific_HmdFound_UnexpectedConfiguration_1 = 1115,
Steam_SteamInstallationNotFound = 2000,
LastError = 2001,
}
@@ -5582,13 +5633,13 @@ public enum VROverlayTransformType
VROverlayTransform_Invalid = -1,
VROverlayTransform_Absolute = 0,
VROverlayTransform_TrackedDeviceRelative = 1,
VROverlayTransform_SystemOverlay = 2,
VROverlayTransform_TrackedComponent = 3,
VROverlayTransform_Cursor = 4,
VROverlayTransform_DashboardTab = 5,
VROverlayTransform_DashboardThumb = 6,
VROverlayTransform_Mountable = 7,
VROverlayTransform_Projection = 8,
VROverlayTransform_Subview = 9,
}
public enum VROverlayFlags
{
@@ -5609,6 +5660,8 @@ public enum VROverlayFlags
HideLaserIntersection = 524288,
WantsModalBehavior = 1048576,
IsPremultiplied = 2097152,
IgnoreTextureAlpha = 4194304,
Reserved = 67108864,
}
public enum VRMessageOverlayResponse
{
@@ -5676,6 +5729,7 @@ public enum EVRRenderModelTextureFormat
BC4 = 2,
BC7 = 3,
BC7_SRGB = 4,
RGBA16_FLOAT = 5,
}
public enum EVRNotificationType
{
@@ -5802,6 +5856,10 @@ public enum EBlockQueueReadType
BlockQueueRead_New = 1,
BlockQueueRead_Next = 2,
}
public enum EBlockQueueCreationFlag
{
BlockQueueFlag_OwnerIsReader = 1,
}
[StructLayout(LayoutKind.Explicit)] public struct VREvent_Data_t
{
@@ -6002,17 +6060,6 @@ public enum EBlockQueueReadType
public ETextureType eType;
public EColorSpace eColorSpace;
}
[StructLayout(LayoutKind.Sequential)] public struct TrackedDevicePose_t
{
public HmdMatrix34_t mDeviceToAbsoluteTracking;
public HmdVector3_t vVelocity;
public HmdVector3_t vAngularVelocity;
public ETrackingResult eTrackingResult;
[MarshalAs(UnmanagedType.I1)]
public bool bPoseIsValid;
[MarshalAs(UnmanagedType.I1)]
public bool bDeviceIsConnected;
}
[StructLayout(LayoutKind.Sequential)] public struct VRTextureBounds_t
{
public float uMin;
@@ -6048,6 +6095,17 @@ public enum EBlockQueueReadType
public HmdMatrix34_t mDeviceToAbsoluteTracking;
public VRTextureDepthInfo_t depth;
}
[StructLayout(LayoutKind.Sequential)] public struct TrackedDevicePose_t
{
public HmdMatrix34_t mDeviceToAbsoluteTracking;
public HmdVector3_t vVelocity;
public HmdVector3_t vAngularVelocity;
public ETrackingResult eTrackingResult;
[MarshalAs(UnmanagedType.I1)]
public bool bPoseIsValid;
[MarshalAs(UnmanagedType.I1)]
public bool bDeviceIsConnected;
}
[StructLayout(LayoutKind.Sequential)] public struct VRVulkanTextureData_t
{
public ulong m_nImage;
@@ -6421,6 +6479,13 @@ public enum EBlockQueueReadType
public uint m_nNumFramePresentsTimedOut;
public uint m_nNumDroppedFramesTimedOut;
public uint m_nNumReprojectedFramesTimedOut;
public uint m_nNumFrameSubmits;
public double m_flSumCompositorCPUTimeMS;
public double m_flSumCompositorGPUTimeMS;
public double m_flSumTargetFrameTimes;
public double m_flSumApplicationCPUTimeMS;
public double m_flSumApplicationGPUTimeMS;
public uint m_nNumFramesWithDepth;
}
[StructLayout(LayoutKind.Sequential)] public struct Compositor_StageRenderSettings
{
@@ -6506,6 +6571,7 @@ public enum EBlockQueueReadType
public ushort unHeight;
public IntPtr rubTextureMapData; // const uint8_t *
public EVRRenderModelTextureFormat format;
public ushort unMipLevels;
}
// This structure is for backwards binary compatibility on Linux and OSX only
[StructLayout(LayoutKind.Sequential, Pack = 4)] public struct RenderModel_TextureMap_t_Packed
@@ -6514,12 +6580,14 @@ public enum EBlockQueueReadType
public ushort unHeight;
public IntPtr rubTextureMapData; // const uint8_t *
public EVRRenderModelTextureFormat format;
public ushort unMipLevels;
public RenderModel_TextureMap_t_Packed(RenderModel_TextureMap_t unpacked)
{
this.unWidth = unpacked.unWidth;
this.unHeight = unpacked.unHeight;
this.rubTextureMapData = unpacked.rubTextureMapData;
this.format = unpacked.format;
this.unMipLevels = unpacked.unMipLevels;
}
public void Unpack(ref RenderModel_TextureMap_t unpacked)
{
@@ -6527,6 +6595,7 @@ public enum EBlockQueueReadType
unpacked.unHeight = this.unHeight;
unpacked.rubTextureMapData = this.rubTextureMapData;
unpacked.format = this.format;
unpacked.unMipLevels = this.unMipLevels;
}
}
[StructLayout(LayoutKind.Sequential)] public struct RenderModel_t
@@ -7565,7 +7634,7 @@ public class OpenVR
public const uint k_unVROverlayMaxNameLength = 128;
public const uint k_unMaxOverlayCount = 128;
public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
public const string IVROverlay_Version = "IVROverlay_025";
public const string IVROverlay_Version = "IVROverlay_027";
public const string IVROverlayView_Version = "IVROverlayView_003";
public const uint k_unHeadsetViewMaxWidth = 3840;
public const uint k_unHeadsetViewMaxHeight = 2160;
@@ -7613,6 +7682,8 @@ public class OpenVR
public const string k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride";
public const string k_pch_SteamVR_FramesToThrottle_Int32 = "framesToThrottle";
public const string k_pch_SteamVR_AdditionalFramesToPredict_Int32 = "additionalFramesToPredict";
public const string k_pch_SteamVR_WorldScale_Float = "worldScale";
public const string k_pch_SteamVR_FovScale_Int32 = "fovScale";
public const string k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync";
public const string k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
public const string k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView";
@@ -7639,7 +7710,6 @@ public class OpenVR
public const string k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor";
public const string k_pch_SteamVR_DebugInputBinding = "debugInputBinding";
public const string k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid";
public const string k_pch_SteamVR_RenderCameraMode = "renderCameraMode";
public const string k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling";
public const string k_pch_SteamVR_EnableSafeMode = "enableSafeMode";
public const string k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate";
@@ -7656,6 +7726,7 @@ public class OpenVR
public const string k_pch_SteamVR_BlockOculusSDKOnOpenVRLaunchOption_Bool = "blockOculusSDKOnOpenVRLaunchOption";
public const string k_pch_SteamVR_BlockOculusSDKOnAllLaunches_Bool = "blockOculusSDKOnAllLaunches";
public const string k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility";
public const string k_pch_SteamVR_DisplayPortTrainingMode_Int = "displayPortTrainingMode";
public const string k_pch_SteamVR_UsePrism_Bool = "usePrism";
public const string k_pch_DirectMode_Section = "direct_mode";
public const string k_pch_DirectMode_Enable_Bool = "enable";
@@ -7708,6 +7779,7 @@ public class OpenVR
public const string k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
public const string k_pch_Perf_TestData_Float = "perfTestData";
public const string k_pch_Perf_GPUProfiling_Bool = "GPUProfiling";
public const string k_pch_Perf_GpuBusMonitoring_Bool = "gpuBusMonitoring";
public const string k_pch_CollisionBounds_Section = "collisionBounds";
public const string k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle";
public const string k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn";
@@ -7764,6 +7836,8 @@ public class OpenVR
public const string k_pch_Dashboard_DesktopScale = "desktopScale";
public const string k_pch_Dashboard_DashboardScale = "dashboardScale";
public const string k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer";
public const string k_pch_Dashboard_StickyDashboard = "stickyDashboard";
public const string k_pch_Dashboard_AllowSteamOverlays_Bool = "allowSteamOverlays";
public const string k_pch_modelskin_Section = "modelskins";
public const string k_pch_Driver_Enable_Bool = "enable";
public const string k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode";
@@ -7776,6 +7850,7 @@ public class OpenVR
public const string k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL";
public const string k_pch_App_BindingLegacyAPISuffix_String = "_legacy";
public const string k_pch_App_BindingSteamVRInputAPISuffix_String = "_steamvrinput";
public const string k_pch_App_BindingOpenXRAPISuffix_String = "_openxr";
public const string k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL";
public const string k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL";
public const string k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave";
@@ -7843,6 +7918,10 @@ public class OpenVR
public const string k_pchPathUserElbowRight = "/user/elbow/right";
public const string k_pchPathUserKneeLeft = "/user/knee/left";
public const string k_pchPathUserKneeRight = "/user/knee/right";
public const string k_pchPathUserWristLeft = "/user/wrist/left";
public const string k_pchPathUserWristRight = "/user/wrist/right";
public const string k_pchPathUserAnkleLeft = "/user/ankle/left";
public const string k_pchPathUserAnkleRight = "/user/ankle/right";
public const string k_pchPathUserWaist = "/user/waist";
public const string k_pchPathUserChest = "/user/chest";
public const string k_pchPathUserCamera = "/user/camera";
@@ -7850,7 +7929,7 @@ public class OpenVR
public const string k_pchPathClientAppKey = "/client_info/app_key";
public const ulong k_ulInvalidPathHandle = 0;
public const string IVRPaths_Version = "IVRPaths_001";
public const string IVRBlockQueue_Version = "IVRBlockQueue_004";
public const string IVRBlockQueue_Version = "IVRBlockQueue_005";
static uint VRToken { get; set; }

View File

@@ -25,7 +25,7 @@ namespace VRCX
Path.Combine(Program.BaseDirectory, "html/vr.html?1")
)
{
DragHandler = new NoopDragHandler(),
DragHandler = new CefNoopDragHandler(),
BrowserSettings =
{
DefaultEncoding = "UTF-8",
@@ -37,7 +37,7 @@ namespace VRCX
Path.Combine(Program.BaseDirectory, "html/vr.html?2")
)
{
DragHandler = new NoopDragHandler(),
DragHandler = new CefNoopDragHandler(),
BrowserSettings =
{
DefaultEncoding = "UTF-8",

Binary file not shown.

Binary file not shown.

View File

@@ -82,64 +82,65 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssetBundleCacher.cs" />
<Compile Include="AutoAppLaunchManager.cs" />
<Compile Include="CefCustomDownloadHandler.cs" />
<Compile Include="CefCustomDragHandler.cs" />
<Compile Include="CefCustomMenuHandler.cs" />
<Compile Include="ScreenshotMetadata.cs" />
<Compile Include="ScreenshotMetadataDatabase.cs" />
<Compile Include="WorldDatabase.cs" />
<Compile Include="ImageCache.cs" />
<Compile Include="IPCClient.cs" />
<Compile Include="IPCServer.cs" />
<Compile Include="ProcessMonitor.cs" />
<Compile Include="ScreenshotHelper.cs" />
<Compile Include="SQLite.cs" />
<Compile Include="StartupArgs.cs" />
<Compile Include="Update.cs" />
<Compile Include="CefService.cs" />
<Compile Include="Discord.cs" />
<Compile Include="CpuMonitor.cs" />
<Compile Include="OffScreenBrowser.cs" />
<Compile Include="NoopDragHandler.cs" />
<Compile Include="OpenVR\openvr_api.cs" />
<Compile Include="WebApi.cs" />
<Compile Include="SQLiteLegacy.cs" />
<Compile Include="SharedVariable.cs" />
<Compile Include="Util.cs" />
<Compile Include="VRForm.cs">
<Compile Include="Dotnet\AppApi.cs" />
<Compile Include="Dotnet\AssetBundleCacher.cs" />
<Compile Include="Dotnet\AutoAppLaunchManager.cs" />
<Compile Include="Dotnet\Cef\CefCustomDownloadHandler.cs" />
<Compile Include="Dotnet\Cef\CefCustomDragHandler.cs" />
<Compile Include="Dotnet\Cef\CefCustomMenuHandler.cs" />
<Compile Include="Dotnet\Cef\CefService.cs" />
<Compile Include="Dotnet\Cef\CefNoopDragHandler.cs" />
<Compile Include="Dotnet\CpuMonitor.cs" />
<Compile Include="Dotnet\Discord.cs" />
<Compile Include="Dotnet\ImageCache.cs" />
<Compile Include="Dotnet\IPC\IPCClient.cs" />
<Compile Include="Dotnet\IPC\IPCPacket.cs" />
<Compile Include="Dotnet\IPC\IPCServer.cs" />
<Compile Include="Dotnet\JsonSerializer.cs" />
<Compile Include="Dotnet\LogWatcher.cs" />
<Compile Include="Dotnet\MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="VRForm.Designer.cs">
<DependentUpon>VRForm.cs</DependentUpon>
</Compile>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<Compile Include="Dotnet\MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="VRCXVR.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="LogWatcher.cs" />
<Compile Include="AppApi.cs" />
<Compile Include="VRCXStorage.cs" />
<Compile Include="JsonSerializer.cs" />
<Compile Include="WorldDataRequestResponse.cs" />
<Compile Include="WorldDBManager.cs" />
<Compile Include="WinApi.cs" />
<Compile Include="WinformBase.cs">
<Compile Include="Dotnet\OpenVR\openvr_api.cs" />
<Compile Include="Dotnet\Overlay\OffScreenBrowser.cs" />
<Compile Include="Dotnet\Overlay\VRCXVR.cs" />
<Compile Include="Dotnet\Overlay\VRForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="WinformThemer.cs" />
<EmbeddedResource Include="VRForm.resx">
<Compile Include="Dotnet\Overlay\VRForm.Designer.cs">
<DependentUpon>VRForm.cs</DependentUpon>
</Compile>
<Compile Include="Dotnet\ProcessMonitor.cs" />
<Compile Include="Dotnet\Program.cs" />
<Compile Include="Dotnet\PWI\WorldDatabase.cs" />
<Compile Include="Dotnet\PWI\WorldDataRequestResponse.cs" />
<Compile Include="Dotnet\PWI\WorldDBManager.cs" />
<Compile Include="Dotnet\ScreenshotMetadata\ScreenshotHelper.cs" />
<Compile Include="Dotnet\ScreenshotMetadata\ScreenshotMetadata.cs" />
<Compile Include="Dotnet\ScreenshotMetadata\ScreenshotMetadataDatabase.cs" />
<Compile Include="Dotnet\SharedVariable.cs" />
<Compile Include="Dotnet\SQLite.cs" />
<Compile Include="Dotnet\SQLiteLegacy.cs" />
<Compile Include="Dotnet\StartupArgs.cs" />
<Compile Include="Dotnet\Update.cs" />
<Compile Include="Dotnet\Util.cs" />
<Compile Include="Dotnet\VRCXStorage.cs" />
<Compile Include="Dotnet\WebApi.cs" />
<Compile Include="Dotnet\WinApi.cs" />
<Compile Include="Dotnet\WinformBase.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Dotnet\WinformThemer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Dotnet\MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
<EmbeddedResource Include="Dotnet\Overlay\VRForm.resx">
<DependentUpon>VRForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
@@ -170,7 +171,12 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="IPCPacket.cs" />
<Content Include="openvr_api.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="sqlite3.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="VRCX.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -236,8 +242,6 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>xcopy /y "$(ProjectDir)OpenVR\win64\openvr_api.dll"
xcopy /y "$(ProjectDir)lib\sqlite3.dll"</PostBuildEvent>
<ContentSQLiteInteropFiles>true</ContentSQLiteInteropFiles>
<CopySQLiteInteropFiles>false</CopySQLiteInteropFiles>
<CleanSQLiteInteropFiles>false</CleanSQLiteInteropFiles>

View File

@@ -1,25 +0,0 @@
@echo off
setlocal
where /q 7z
IF ERRORLEVEL 1 (
set ZIP_BIN="C:\Program Files\7-Zip\7z.exe"
) ELSE (
set ZIP_BIN=7z
)
cd /d %~dp0
msbuild VRCX.sln -p:Configuration=Release -p:Platform=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m
cd html
call npm ci
call npm run production
cd ..
mklink /J "%~dp0\bin\x64\Release\html" "%~dp0\html\dist"
for /f %%a in ('powershell -Command "Get-Date -format yyyyMMdd"') do set TODAY=%%a
set ZIP_NAME=VRCX_%TODAY%.zip
echo %ZIP_NAME%
rem using 7-Zip (https://www.7-zip.org)
cd "%~dp0\bin\x64\Release"
%ZIP_BIN% a -tzip %ZIP_NAME% * -mx=7 -xr0!*.log -xr0!*.pdb
cd "%~dp0"
move "%~dp0\bin\x64\Release\%ZIP_NAME%" "%~dp0"
rd "%~dp0\bin\x64\Release\html"
pause

4
build-dotnet.cmd Normal file
View File

@@ -0,0 +1,4 @@
@echo off
msbuild VRCX.sln -p:Configuration=Release -p:Platform=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m
mklink /J "%~dp0\bin\x64\Release\html" "%~dp0\html\dist"
pause

View File

@@ -1,19 +0,0 @@
@echo off
setlocal
cd /d %~dp0
msbuild VRCX.sln -p:Configuration=Release -p:Platform=x64 -p:RestorePackagesConfig=true -t:"Restore;Clean;Build" -m
cd html
call npm ci
call npm run production
cd ..
mklink /J "%~dp0\bin\x64\Release\html" "%~dp0\html\dist"
for /f %%a in ('powershell -Command "Get-Date -format yyyyMMdd"') do set TODAY=%%a
set ZIP_NAME=VRCX_%TODAY%.zip
echo %ZIP_NAME%
rem using bandizip (https://www.bandisoft.com/bandizip)
cd "%~dp0\bin\x64\Release"
bz c -l:9 -r -storeroot:yes -ex:"cache;userdata;*.log;*.json;*.sqlite3;*.pdb;*.config" -cmt:"https://github.com/vrcx-team/VRCX" %ZIP_NAME% *
cd "%~dp0"
move "%~dp0\bin\x64\Release\%ZIP_NAME%" "%~dp0"
rd "%~dp0\bin\x64\Release\html"
pause

View File

@@ -28019,7 +28019,8 @@ speechSynthesis.getVoices();
}
var result = await AppApi.SetVRChatRegistryKey(
'LOGGING_ENABLED',
'1'
'1',
4
);
if (!result) {
// failed to set key

BIN
openvr_api.dll Normal file

Binary file not shown.