RenderDoc.SetMostRecentCaptureFileComments

This commit is contained in:
GreemDev 2025-12-31 21:19:52 -06:00
parent 9099004b5c
commit f5c66a5221

View file

@ -408,6 +408,28 @@ namespace Ryujinx.Graphics.RenderDocApi
Api->TriggerMultiFrameCapture(numFrames);
}
/// <summary>
/// Adds an arbitrary comments field to the most recent capture,
/// which will then be displayed in the UI to anyone opening the capture.
/// <br/><br/>
/// This is equivalent to calling <see cref="SetCaptureFileComments"/> with a null first (fileName) parameter.
/// </summary>
/// <param name="comments">the comments to set in the capture file.</param>
/// <remarks>Requires RenderDoc API version 1.2</remarks>
public static void SetMostRecentCaptureFileComments(string comments)
{
if (Api is null) return;
AssertAtLeast(1, 2);
byte[] commentBytes = comments.ToNullTerminatedByteArray();
fixed (byte* pcomment = commentBytes)
{
Api->SetCaptureFileComments((byte*)nint.Zero, pcomment);
}
}
/// <summary>
/// Adds an arbitrary comments field to an existing capture on disk,
/// which will then be displayed in the UI to anyone opening the capture.
@ -531,7 +553,7 @@ namespace Ryujinx.Graphics.RenderDocApi
}
private static RenderDocApi* _api = null;
private static bool _loaded = false;
private static bool _loaded;
private static RenderDocApi* Api
{