Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Improve error handling for D3D11 device creation

Richie McIlroyc54eb71c32f7
diff --git a/crates/recording/src/studio_recording.rs b/crates/recording/src/studio_recording.rs
index 3fe0cfb52..484f759de 100644
--- a/crates/recording/src/studio_recording.rs
+++ b/crates/recording/src/studio_recording.rs
@@ -895,7 +895,8 @@ async fn create_segment_pipeline(
#[cfg(windows)] encoder_preferences: crate::capture_pipeline::EncoderPreferences,
) -> anyhow::Result<Pipeline> {
#[cfg(windows)]
- let d3d_device = crate::capture_pipeline::create_d3d_device().unwrap();
+ let d3d_device = crate::capture_pipeline::create_d3d_device()
+ .context("D3D11 device creation failed - this may happen in VMs, RDP sessions, or systems without GPU drivers")?;
let (display, crop) =
target_to_display_and_crop(&base_inputs.capture_target).context("target_display_crop")?;