mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-14 01:35:36 +00:00
Add a new in-app API function ShowReplayUI to raise the UI window
* This is not guaranteed to work, e.g. on windows where for good reason background windows can't necessarily raise themselves.
This commit is contained in:
@@ -239,28 +239,33 @@ static uint32_t DiscardFrameCapture(void *device, void *wndHandle)
|
||||
return RenderDoc::Inst().DiscardFrameCapture(device, wndHandle) ? 1 : 0;
|
||||
}
|
||||
|
||||
static uint32_t ShowReplayUI()
|
||||
{
|
||||
return RenderDoc::Inst().ShowReplayUI() ? 1 : 0;
|
||||
}
|
||||
|
||||
// defined in capture_options.cpp
|
||||
int RENDERDOC_CC SetCaptureOptionU32(RENDERDOC_CaptureOption opt, uint32_t val);
|
||||
int RENDERDOC_CC SetCaptureOptionF32(RENDERDOC_CaptureOption opt, float val);
|
||||
uint32_t RENDERDOC_CC GetCaptureOptionU32(RENDERDOC_CaptureOption opt);
|
||||
float RENDERDOC_CC GetCaptureOptionF32(RENDERDOC_CaptureOption opt);
|
||||
|
||||
void RENDERDOC_CC GetAPIVersion_1_4_2(int *major, int *minor, int *patch)
|
||||
void RENDERDOC_CC GetAPIVersion_1_5_0(int *major, int *minor, int *patch)
|
||||
{
|
||||
if(major)
|
||||
*major = 1;
|
||||
if(minor)
|
||||
*minor = 4;
|
||||
*minor = 5;
|
||||
if(patch)
|
||||
*patch = 2;
|
||||
*patch = 0;
|
||||
}
|
||||
|
||||
RENDERDOC_API_1_4_2 api_1_4_2;
|
||||
void Init_1_4_2()
|
||||
RENDERDOC_API_1_5_0 api_1_5_0;
|
||||
void Init_1_5_0()
|
||||
{
|
||||
RENDERDOC_API_1_4_2 &api = api_1_4_2;
|
||||
RENDERDOC_API_1_5_0 &api = api_1_5_0;
|
||||
|
||||
api.GetAPIVersion = &GetAPIVersion_1_4_2;
|
||||
api.GetAPIVersion = &GetAPIVersion_1_5_0;
|
||||
|
||||
api.SetCaptureOptionU32 = &SetCaptureOptionU32;
|
||||
api.SetCaptureOptionF32 = &SetCaptureOptionF32;
|
||||
@@ -299,6 +304,8 @@ void Init_1_4_2()
|
||||
api.SetCaptureFileComments = &SetCaptureFileComments;
|
||||
|
||||
api.DiscardFrameCapture = &DiscardFrameCapture;
|
||||
|
||||
api.ShowReplayUI = &ShowReplayUI;
|
||||
}
|
||||
|
||||
extern "C" RENDERDOC_API int RENDERDOC_CC RENDERDOC_GetAPI(RENDERDOC_Version version,
|
||||
@@ -325,17 +332,18 @@ extern "C" RENDERDOC_API int RENDERDOC_CC RENDERDOC_GetAPI(RENDERDOC_Version ver
|
||||
ret = 1; \
|
||||
}
|
||||
|
||||
API_VERSION_HANDLE(1_0_0, 1_4_2);
|
||||
API_VERSION_HANDLE(1_0_1, 1_4_2);
|
||||
API_VERSION_HANDLE(1_0_2, 1_4_2);
|
||||
API_VERSION_HANDLE(1_1_0, 1_4_2);
|
||||
API_VERSION_HANDLE(1_1_1, 1_4_2);
|
||||
API_VERSION_HANDLE(1_1_2, 1_4_2);
|
||||
API_VERSION_HANDLE(1_2_0, 1_4_2);
|
||||
API_VERSION_HANDLE(1_3_0, 1_4_2);
|
||||
API_VERSION_HANDLE(1_4_0, 1_4_2);
|
||||
API_VERSION_HANDLE(1_4_1, 1_4_2);
|
||||
API_VERSION_HANDLE(1_4_2, 1_4_2);
|
||||
API_VERSION_HANDLE(1_0_0, 1_5_0);
|
||||
API_VERSION_HANDLE(1_0_1, 1_5_0);
|
||||
API_VERSION_HANDLE(1_0_2, 1_5_0);
|
||||
API_VERSION_HANDLE(1_1_0, 1_5_0);
|
||||
API_VERSION_HANDLE(1_1_1, 1_5_0);
|
||||
API_VERSION_HANDLE(1_1_2, 1_5_0);
|
||||
API_VERSION_HANDLE(1_2_0, 1_5_0);
|
||||
API_VERSION_HANDLE(1_3_0, 1_5_0);
|
||||
API_VERSION_HANDLE(1_4_0, 1_5_0);
|
||||
API_VERSION_HANDLE(1_4_1, 1_5_0);
|
||||
API_VERSION_HANDLE(1_4_2, 1_5_0);
|
||||
API_VERSION_HANDLE(1_5_0, 1_5_0);
|
||||
|
||||
#undef API_VERSION_HANDLE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user