We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9edf597 commit 039399cCopy full SHA for 039399c
crates/scap-direct3d/src/lib.rs
@@ -120,6 +120,8 @@ pub enum NewCapturerError {
120
UpdateIntervalNotSupported,
121
#[error("CreateDevice: {0}")]
122
CreateDevice(windows::core::Error),
123
+ #[error("CreateDevice: {0}")]
124
+ Context(windows::core::Error),
125
#[error("Direct3DDevice: {0}")]
126
Direct3DDevice(windows::core::Error),
127
#[error("FramePool: {0}")]
@@ -192,7 +194,7 @@ impl Capturer {
192
194
let (d3d_device, d3d_context) = d3d_device
193
195
.map(|d| unsafe { d.GetImmediateContext() }.map(|v| (d, v)))
196
.transpose()
- .unwrap()
197
+ .map_err(NewCapturerError::Context)?
198
.unwrap();
199
200
let item = item.clone();
0 commit comments