コード例 #1
0
        private string GetScreenshotFilename(uint screenshotHandle,
                                             EVRScreenshotPropertyFilenames screenshotPropertyFilename)
        {
            var error    = EVRScreenshotError.None;
            var capacity = OpenVR.Screenshots.GetScreenshotPropertyFilename(screenshotHandle,
                                                                            screenshotPropertyFilename, null, 0, ref error);

            if (error != EVRScreenshotError.None && error != EVRScreenshotError.BufferTooSmall)
            {
                return(null);
            }
            if (capacity > 1)
            {
                var result = new System.Text.StringBuilder((int)capacity);
                OpenVR.Screenshots.GetScreenshotPropertyFilename(screenshotHandle, screenshotPropertyFilename, result,
                                                                 capacity, ref error);
                if (error != EVRScreenshotError.None)
                {
                    return(null);
                }
                return(result.ToString());
            }

            return(null);
        }
コード例 #2
0
        private string GetScreenshotFilename(uint screenshotHandle, EVRScreenshotPropertyFilenames screenshotPropertyFilename)
        {
            EVRScreenshotError pError        = EVRScreenshotError.None;
            uint screenshotPropertyFilename2 = OpenVR.Screenshots.GetScreenshotPropertyFilename(screenshotHandle, screenshotPropertyFilename, null, 0u, ref pError);

            if (pError != 0 && pError != EVRScreenshotError.BufferTooSmall)
            {
                return(null);
            }
            if (screenshotPropertyFilename2 > 1)
            {
                StringBuilder stringBuilder = new StringBuilder((int)screenshotPropertyFilename2);
                OpenVR.Screenshots.GetScreenshotPropertyFilename(screenshotHandle, screenshotPropertyFilename, stringBuilder, screenshotPropertyFilename2, ref pError);
                if (pError != 0)
                {
                    return(null);
                }
                return(stringBuilder.ToString());
            }
            return(null);
        }
コード例 #3
0
ファイル: openvr_api.cs プロジェクト: Chazman11/SGJ
	public uint GetScreenshotPropertyFilename(uint screenshotHandle,EVRScreenshotPropertyFilenames filenameType,System.Text.StringBuilder pchFilename,uint cchFilename,ref EVRScreenshotError pError)
	{
		uint result = FnTable.GetScreenshotPropertyFilename(screenshotHandle,filenameType,pchFilename,cchFilename,ref pError);
		return result;
	}
コード例 #4
0
 // Token: 0x06001FF4 RID: 8180 RVA: 0x0009E421 File Offset: 0x0009C621
 public uint GetScreenshotPropertyFilename(uint screenshotHandle, EVRScreenshotPropertyFilenames filenameType, StringBuilder pchFilename, uint cchFilename, ref EVRScreenshotError pError)
 {
     return(this.FnTable.GetScreenshotPropertyFilename(screenshotHandle, filenameType, pchFilename, cchFilename, ref pError));
 }
コード例 #5
0
ファイル: SteamVR_Render.cs プロジェクト: Cratesmith/NewtonVR
 private string GetScreenshotFilename(uint screenshotHandle, EVRScreenshotPropertyFilenames screenshotPropertyFilename)
 {
     var error = EVRScreenshotError.None;
     var capacity = OpenVR.Screenshots.GetScreenshotPropertyFilename(screenshotHandle, screenshotPropertyFilename, null, 0, ref error);
     if (error != EVRScreenshotError.None && error != EVRScreenshotError.BufferTooSmall )
         return null;
     if (capacity > 1)
     {
         var result = new System.Text.StringBuilder((int)capacity);
         OpenVR.Screenshots.GetScreenshotPropertyFilename(screenshotHandle, screenshotPropertyFilename, result, capacity, ref error);
         if (error != EVRScreenshotError.None)
             return null;
         return result.ToString();
     }
     return null;
 }
コード例 #6
0
 public EVRScreenshotType GetScreenshotPropertyType(uint screenshotHandle, ref EVRScreenshotError pError) => default;                                                                                  // 0x00000001811DF630-0x00000001811DF650
 public uint GetScreenshotPropertyFilename(uint screenshotHandle, EVRScreenshotPropertyFilenames filenameType, StringBuilder pchFilename, uint cchFilename, ref EVRScreenshotError pError) => default; // 0x00000001811DF900-0x00000001811DF930