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 committed Nov 4, 2024
1 parent 1ce89df commit 6309184
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 6309184

Please sign in to comment.