From 784156cc23f817c37a3c75aea91e5fe2f7c217a9 Mon Sep 17 00:00:00 2001 From: Aras Pranckevicius Date: Mon, 4 Nov 2024 18:44:59 +0200 Subject: [PATCH] Disable "Recompress capture" on images When renderdoc opens an image file, it treats it as a "somewhat special" capture. However compressing it only corrupts the source image file, without doing anything useful. So disable that menu item for "image" captures. --- qrenderdoc/Windows/MainWindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qrenderdoc/Windows/MainWindow.cpp b/qrenderdoc/Windows/MainWindow.cpp index d7a61dc5e..1335dd9b3 100644 --- a/qrenderdoc/Windows/MainWindow.cpp +++ b/qrenderdoc/Windows/MainWindow.cpp @@ -2178,7 +2178,10 @@ void MainWindow::OnCaptureLoaded() statusProgress->setVisible(false); - ui->action_Recompress_Capture->setEnabled(true); + // don't allow capture recompress on opened images + QString driver = m_Ctx.Replay().GetCaptureAccess()->DriverName(); + bool is_image = driver == lit("Image"); + ui->action_Recompress_Capture->setEnabled(!is_image); ui->action_Start_Replay_Loop->setEnabled(true); ui->action_Open_RGP_Profile->setEnabled(