Skip to content

Commit

Permalink
Disable "Recompress capture" on images
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aras-p authored and baldurk committed Nov 4, 2024
1 parent 76b6d47 commit 784156c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion qrenderdoc/Windows/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 784156c

Please sign in to comment.