mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 13:00:32 +00:00
Tidy up and implement support for self capture on linux
This commit is contained in:
@@ -394,7 +394,12 @@ MainWindow::MainWindow(ICaptureContext &ctx) : QMainWindow(NULL), ui(new Ui::Mai
|
||||
ui->action_Recompress_Capture->setEnabled(false);
|
||||
|
||||
#if defined(Q_OS_WIN32)
|
||||
if(GetModuleHandleA("rdocself.dll"))
|
||||
#define SELF_HOST_NAME "rdocself.dll"
|
||||
#else
|
||||
#define SELF_HOST_NAME "librdocself.so"
|
||||
#endif
|
||||
|
||||
if(RENDERDOC_CanSelfHostedCapture(SELF_HOST_NAME))
|
||||
{
|
||||
QAction *begin = new QAction(tr("Start Self-hosted Capture"), this);
|
||||
QAction *end = new QAction(tr("End Self-hosted Capture"), this);
|
||||
@@ -404,21 +409,20 @@ MainWindow::MainWindow(ICaptureContext &ctx) : QMainWindow(NULL), ui(new Ui::Mai
|
||||
begin->setEnabled(false);
|
||||
end->setEnabled(true);
|
||||
|
||||
RENDERDOC_StartSelfHostCapture("rdocself.dll");
|
||||
RENDERDOC_StartSelfHostCapture(SELF_HOST_NAME);
|
||||
});
|
||||
|
||||
QObject::connect(end, &QAction::triggered, [begin, end]() {
|
||||
begin->setEnabled(true);
|
||||
end->setEnabled(false);
|
||||
|
||||
RENDERDOC_EndSelfHostCapture("rdocself.dll");
|
||||
RENDERDOC_EndSelfHostCapture(SELF_HOST_NAME);
|
||||
});
|
||||
|
||||
ui->menu_Tools->addSeparator();
|
||||
ui->menu_Tools->addAction(begin);
|
||||
ui->menu_Tools->addAction(end);
|
||||
}
|
||||
#endif
|
||||
|
||||
m_Ctx.AddCaptureViewer(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user