From 28c7772e693d0af92a60a809bc7d193a1c0ef1fa Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 24 Aug 2015 20:05:41 +0200 Subject: [PATCH] Fix some missing export functions that are needed for capturing * These were removed from the public API but are still needed directly for the capturing process. --- renderdoc/os/win32/win32_process.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/renderdoc/os/win32/win32_process.cpp b/renderdoc/os/win32/win32_process.cpp index b9309d325..68db8b7b5 100644 --- a/renderdoc/os/win32/win32_process.cpp +++ b/renderdoc/os/win32/win32_process.cpp @@ -36,6 +36,25 @@ #include using std::string; +// helpers for various shims and dlls etc, not part of the public API +extern "C" __declspec(dllexport) +void __cdecl RENDERDOC_GetRemoteAccessIdent(uint32_t *ident) +{ + if(ident) *ident = RenderDoc::Inst().GetRemoteAccessIdent(); +} + +extern "C" __declspec(dllexport) +void __cdecl RENDERDOC_SetCaptureOptions(CaptureOptions *opts) +{ + if(opts) RenderDoc::Inst().SetCaptureOptions(*opts); +} + +extern "C" __declspec(dllexport) +void __cdecl RENDERDOC_SetLogFile(const char *log) +{ + if(log) RenderDoc::Inst().SetLogFile(log); +} + void InjectDLL(HANDLE hProcess, wstring libName) { wchar_t dllPath[MAX_PATH + 1] = {0}; @@ -249,12 +268,6 @@ static PROCESS_INFORMATION RunProcess(const char *app, const char *workingDir, c return pi; } -extern "C" __declspec(dllexport) -void __cdecl RENDERDOC_GetRemoteAccessIdent(uint32_t *ident) -{ - if(ident) *ident = RenderDoc::Inst().GetRemoteAccessIdent(); -} - uint32_t Process::InjectIntoProcess(uint32_t pid, const char *logfile, const CaptureOptions *opts, bool waitForExit) { CaptureOptions options;