Skip to content

Commit

Permalink
Merge pull request #168 from mfontanini/preload-graphics-mode
Browse files Browse the repository at this point in the history
Don't preload graphics mode when generating pdf metadata
  • Loading branch information
mfontanini committed Jan 24, 2024
2 parents f54dc1e + 00ae306 commit f2695a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,10 @@ fn run(mut cli: Cli) -> Result<(), Box<dyn std::error::Error>> {
display_acknowledgements();
return Ok(());
}
// Pre-load this so we don't flicker on the first displayed image when using viuer.
GraphicsMode::detect_graphics_protocol();
if !cli.generate_pdf_metadata {
// Pre-load this so we don't flicker on the first displayed image when using viuer.
GraphicsMode::detect_graphics_protocol();
}

let path = cli.path.take().unwrap_or_else(|| {
Cli::command().error(ErrorKind::MissingRequiredArgument, "no path specified").exit();
Expand Down

0 comments on commit f2695a9

Please sign in to comment.