mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-26 08:26:50 +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);
|
||||
|
||||
@@ -70,6 +70,7 @@ private slots:
|
||||
void on_captures_itemActivated(QListWidgetItem *item);
|
||||
void on_childProcesses_itemActivated(QListWidgetItem *item);
|
||||
void on_triggerImmediateCapture_clicked();
|
||||
void on_cycleActiveWindow_clicked();
|
||||
void on_triggerDelayedCapture_clicked();
|
||||
void on_queueCap_clicked();
|
||||
void on_previewSplit_splitterMoved(int pos, int index);
|
||||
|
||||
@@ -190,7 +190,14 @@
|
||||
<string>Tools</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="2" column="1">
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="triggerImmediateCapture">
|
||||
<property name="text">
|
||||
<string>Capture Frame(s) Immediately</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QDoubleSpinBox" name="captureDelay">
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
@@ -212,7 +219,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QDoubleSpinBox" name="captureFrame">
|
||||
<property name="prefix">
|
||||
<string>Frame </string>
|
||||
@@ -225,14 +232,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QPushButton" name="triggerDelayedCapture">
|
||||
<property name="text">
|
||||
<string>Capture After Delay:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QPushButton" name="queueCap">
|
||||
<property name="text">
|
||||
<string>Capture Specific Frame(s):</string>
|
||||
@@ -267,7 +274,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<item row="5" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@@ -280,10 +287,10 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="triggerImmediateCapture">
|
||||
<item row="6" column="0">
|
||||
<widget class="QPushButton" name="cycleActiveWindow">
|
||||
<property name="text">
|
||||
<string>Capture Frame(s) Immediately</string>
|
||||
<string>Cycle Active Window</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user