diff --git a/renderdoccmd/renderdoccmd.vcxproj b/renderdoccmd/renderdoccmd.vcxproj
index 33a016a37..7b7de56af 100644
--- a/renderdoccmd/renderdoccmd.vcxproj
+++ b/renderdoccmd/renderdoccmd.vcxproj
@@ -22,6 +22,7 @@
{D03DF2F9-513C-4084-BBDD-1DEE8D9250D7}
Win32Proj
renderdoccmd
+ renderdoccmd
diff --git a/renderdocui/Code/Win32PInvoke.cs b/renderdocui/Code/Win32PInvoke.cs
index 2f56f9406..87c5b9146 100644
--- a/renderdocui/Code/Win32PInvoke.cs
+++ b/renderdocui/Code/Win32PInvoke.cs
@@ -36,6 +36,8 @@ namespace renderdocui.Code
{
[DllImport("kernel32", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern IntPtr LoadLibrary(string lpFileName);
+ [DllImport("kernel32", SetLastError = true, CharSet = CharSet.Unicode)]
+ public static extern IntPtr GetModuleHandle(string lpFileName);
[StructLayout(LayoutKind.Sequential)]
public struct POINT
diff --git a/renderdocui/Windows/MainWindow.cs b/renderdocui/Windows/MainWindow.cs
index 31d4180c3..fa1039fd7 100644
--- a/renderdocui/Windows/MainWindow.cs
+++ b/renderdocui/Windows/MainWindow.cs
@@ -176,6 +176,23 @@ namespace renderdocui.Windows
{
bool loaded = LoadLayout(0);
+ if (Win32PInvoke.GetModuleHandle("rdocself.dll") != IntPtr.Zero)
+ {
+ ToolStripMenuItem beginSelfCap = new ToolStripMenuItem();
+ beginSelfCap.Text = "Start Self-hosted Capture";
+ beginSelfCap.Click += new EventHandler((object o, EventArgs a) => { StaticExports.StartSelfHostCapture("rdocself.dll"); });
+
+ ToolStripMenuItem endSelfCap = new ToolStripMenuItem();
+ endSelfCap.Text = "End Self-hosted Capture";
+ endSelfCap.Click += new EventHandler((object o, EventArgs a) => { StaticExports.EndSelfHostCapture("rdocself.dll"); });
+
+ toolsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] {
+ new System.Windows.Forms.ToolStripSeparator(),
+ beginSelfCap,
+ endSelfCap,
+ });
+ }
+
CheckUpdates();
Thread remoteStatusThread = Helpers.NewThread(new ThreadStart(() =>