mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 17:36:36 +00:00
Cycle active window with button
A new button is added to the UI so that we can cycle the currently active window when there are more windows to capture. It's like pressing the F11 button but it works on Android too.
This commit is contained in:
committed by
Baldur Karlsson
parent
c132142723
commit
369d93b99c
@@ -122,6 +122,7 @@ LiveCapture::LiveCapture(ICaptureContext &ctx, const QString &hostname, const QS
|
||||
ui->triggerDelayedCapture->setEnabled(false);
|
||||
ui->triggerImmediateCapture->setEnabled(false);
|
||||
ui->queueCap->setEnabled(false);
|
||||
ui->cycleActiveWindow->setEnabled(false);
|
||||
|
||||
ui->target->setText(QString());
|
||||
|
||||
@@ -282,6 +283,11 @@ void LiveCapture::on_triggerImmediateCapture_clicked()
|
||||
m_CaptureNumFrames = (int)ui->numFrames->value();
|
||||
}
|
||||
|
||||
void LiveCapture::on_cycleActiveWindow_clicked()
|
||||
{
|
||||
m_Connection->CycleActiveWindow();
|
||||
}
|
||||
|
||||
void LiveCapture::on_triggerDelayedCapture_clicked()
|
||||
{
|
||||
if(ui->captureDelay->value() == 0.0)
|
||||
@@ -1257,6 +1263,12 @@ void LiveCapture::connectionThreadEntry()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(msg.type == TargetControlMessageType::CapturableWindowCount)
|
||||
{
|
||||
uint32_t windows = msg.capturableWindowCount;
|
||||
GUIInvoke::call(this, [this, windows]() { ui->cycleActiveWindow->setEnabled(windows > 1); });
|
||||
}
|
||||
}
|
||||
|
||||
GUIInvoke::call(this, [this]() {
|
||||
@@ -1269,6 +1281,7 @@ void LiveCapture::connectionThreadEntry()
|
||||
ui->triggerDelayedCapture->setEnabled(false);
|
||||
ui->triggerImmediateCapture->setEnabled(false);
|
||||
ui->queueCap->setEnabled(false);
|
||||
ui->cycleActiveWindow->setEnabled(false);
|
||||
|
||||
ui->apiStatus->setText(tr("None"));
|
||||
ui->apiIcon->setVisible(false);
|
||||
|
||||
Reference in New Issue
Block a user