Skip to content

Commit 3da3c24

Browse files
committed
AsyncInvoke check for AMDRGPProfile Section in OnCaptureLoaded
1 parent 1b47b01 commit 3da3c24

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

qrenderdoc/Windows/MainWindow.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,9 +2247,17 @@ void MainWindow::OnCaptureLoaded()
22472247
updateToolsMenuOptions();
22482248

22492249
ui->action_Start_Replay_Loop->setEnabled(true);
2250-
ui->action_Open_RGP_Profile->setEnabled(
2251-
m_Ctx.Replay().GetCaptureAccess()->FindSectionByType(SectionType::AMDRGPProfile) >= 0);
2250+
2251+
ui->action_Open_RGP_Profile->setEnabled(false);
22522252
ui->action_Create_RGP_Profile->setEnabled(m_Ctx.APIProps().rgpCapture && m_Ctx.IsCaptureLocal());
2253+
m_Ctx.Replay().AsyncInvoke([this](IReplayController *) {
2254+
bool hasAMDGRPPorfile =
2255+
(m_Ctx.Replay().GetCaptureAccess()->FindSectionByType(SectionType::AMDRGPProfile) >= 0);
2256+
2257+
GUIInvoke::call(this, [this, hasAMDGRPPorfile]() {
2258+
ui->action_Open_RGP_Profile->setEnabled(hasAMDGRPPorfile);
2259+
});
2260+
});
22532261

22542262
setCaptureHasErrors(!m_Ctx.DebugMessages().empty());
22552263

0 commit comments

Comments
 (0)