mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-26 00:16:45 +00:00
Require explicit opt-in to enable process injection on windows
* This option (in spite of large warnings) continues to be a pitfall for new and experienced users alike, trying to use process injection without good reason and getting into trouble when it breaks.
This commit is contained in:
@@ -221,6 +221,7 @@ SettingsDialog::SettingsDialog(ICaptureContext &ctx, QWidget *parent)
|
||||
#endif
|
||||
|
||||
ui->AllowGlobalHook->setChecked(m_Ctx.Config().AllowGlobalHook);
|
||||
ui->AllowProcessInject->setChecked(m_Ctx.Config().AllowProcessInject);
|
||||
|
||||
ui->EventBrowser_TimeUnit->setCurrentIndex((int)m_Ctx.Config().EventBrowser_TimeUnit);
|
||||
ui->EventBrowser_AddFake->setChecked(m_Ctx.Config().EventBrowser_AddFake);
|
||||
@@ -248,6 +249,12 @@ SettingsDialog::SettingsDialog(ICaptureContext &ctx, QWidget *parent)
|
||||
ui->globalHookLabel->setToolTip(disabledTooltip);
|
||||
}
|
||||
|
||||
// process injection is not supported on non-Windows
|
||||
#if !defined(Q_OS_WIN32)
|
||||
ui->injectProcLabel->setVisible(false);
|
||||
ui->AllowProcessInject->setVisible(false);
|
||||
#endif
|
||||
|
||||
m_Init = false;
|
||||
|
||||
QObject::connect(ui->Font_GlobalScale->lineEdit(), &QLineEdit::returnPressed, this,
|
||||
@@ -390,6 +397,16 @@ void SettingsDialog::on_AllowGlobalHook_toggled(bool checked)
|
||||
m_Ctx.GetCaptureDialog()->UpdateGlobalHook();
|
||||
}
|
||||
|
||||
void SettingsDialog::on_AllowProcessInject_toggled(bool checked)
|
||||
{
|
||||
m_Ctx.Config().AllowProcessInject = ui->AllowProcessInject->isChecked();
|
||||
|
||||
m_Ctx.Config().Save();
|
||||
|
||||
if(m_Ctx.HasCaptureDialog())
|
||||
m_Ctx.GetCaptureDialog()->UpdateGlobalHook();
|
||||
}
|
||||
|
||||
void SettingsDialog::on_CheckUpdate_AllowChecks_toggled(bool checked)
|
||||
{
|
||||
m_Ctx.Config().CheckUpdate_AllowChecks = ui->CheckUpdate_AllowChecks->isChecked();
|
||||
|
||||
Reference in New Issue
Block a user