mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Allow specifying a listen interface and port, for remote replaying
This commit is contained in:
@@ -169,7 +169,7 @@ namespace renderdocui.Code
|
||||
return;
|
||||
}
|
||||
|
||||
remote = StaticExports.CreateRemoteReplayConnection(m_ReplayHost);
|
||||
remote = StaticExports.CreateRemoteReplayConnection(m_ReplayHost, 0);
|
||||
|
||||
if(remote == null)
|
||||
{
|
||||
|
||||
@@ -54,13 +54,13 @@ namespace renderdoc
|
||||
private static extern UInt32 RENDERDOC_EnumerateRemoteConnections(IntPtr host, UInt32 nextIdent);
|
||||
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern ReplayCreateStatus RENDERDOC_CreateRemoteReplayConnection(IntPtr host, ref IntPtr outrend);
|
||||
private static extern ReplayCreateStatus RENDERDOC_CreateRemoteReplayConnection(IntPtr host, UInt32 port, ref IntPtr outrend);
|
||||
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern void RENDERDOC_GetDefaultCaptureOptions(IntPtr outopts);
|
||||
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern void RENDERDOC_SpawnReplayHost(ref bool killReplay);
|
||||
private static extern void RENDERDOC_SpawnReplayHost(IntPtr host, UInt32 port, ref bool killReplay);
|
||||
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern void RENDERDOC_TriggerExceptionHandler(IntPtr exceptionPtrs, bool crashed);
|
||||
@@ -202,13 +202,13 @@ namespace renderdoc
|
||||
CustomMarshal.Free(host_mem);
|
||||
}
|
||||
|
||||
public static RemoteRenderer CreateRemoteReplayConnection(string host)
|
||||
public static RemoteRenderer CreateRemoteReplayConnection(string host, uint port)
|
||||
{
|
||||
IntPtr rendPtr = IntPtr.Zero;
|
||||
|
||||
IntPtr host_mem = CustomMarshal.MakeUTF8String(host);
|
||||
|
||||
ReplayCreateStatus ret = RENDERDOC_CreateRemoteReplayConnection(host_mem, ref rendPtr);
|
||||
ReplayCreateStatus ret = RENDERDOC_CreateRemoteReplayConnection(host_mem, port, ref rendPtr);
|
||||
|
||||
CustomMarshal.Free(host_mem);
|
||||
|
||||
@@ -222,9 +222,13 @@ namespace renderdoc
|
||||
return new RemoteRenderer(rendPtr);
|
||||
}
|
||||
|
||||
public static void SpawnReplayHost(ref bool killReplay)
|
||||
public static void SpawnReplayHost(string host, uint port, ref bool killReplay)
|
||||
{
|
||||
RENDERDOC_SpawnReplayHost(ref killReplay);
|
||||
IntPtr host_mem = CustomMarshal.MakeUTF8String(host);
|
||||
|
||||
RENDERDOC_SpawnReplayHost(host_mem, port, ref killReplay);
|
||||
|
||||
CustomMarshal.Free(host_mem);
|
||||
}
|
||||
|
||||
public static void TriggerExceptionHandler(IntPtr exceptionPtrs, bool crashed)
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace renderdocui.Windows.Dialogs
|
||||
string[] proxies = new string[0];
|
||||
try
|
||||
{
|
||||
var dummy = StaticExports.CreateRemoteReplayConnection("-");
|
||||
var dummy = StaticExports.CreateRemoteReplayConnection("-", 0);
|
||||
proxies = dummy.LocalProxies();
|
||||
dummy.Shutdown();
|
||||
}
|
||||
|
||||
@@ -673,7 +673,7 @@ namespace renderdocui.Windows
|
||||
string[] drivers = new string[0];
|
||||
try
|
||||
{
|
||||
var dummy = StaticExports.CreateRemoteReplayConnection(m_RemoteReplay);
|
||||
var dummy = StaticExports.CreateRemoteReplayConnection(m_RemoteReplay, 0);
|
||||
drivers = dummy.RemoteSupportedReplays();
|
||||
dummy.Shutdown();
|
||||
}
|
||||
@@ -708,7 +708,7 @@ namespace renderdocui.Windows
|
||||
string[] proxies = new string[0];
|
||||
try
|
||||
{
|
||||
var dummy = StaticExports.CreateRemoteReplayConnection("-");
|
||||
var dummy = StaticExports.CreateRemoteReplayConnection("-", 0);
|
||||
proxies = dummy.LocalProxies();
|
||||
dummy.Shutdown();
|
||||
}
|
||||
@@ -1498,7 +1498,7 @@ namespace renderdocui.Windows
|
||||
|
||||
Thread thread = Helpers.NewThread(new ThreadStart(() =>
|
||||
{
|
||||
StaticExports.SpawnReplayHost(ref killReplay);
|
||||
StaticExports.SpawnReplayHost("", 0, ref killReplay);
|
||||
}));
|
||||
|
||||
thread.Start();
|
||||
|
||||
Reference in New Issue
Block a user