Open .slatepack file with the app #13
1 changed files with 25 additions and 26 deletions
|
@ -226,8 +226,7 @@ impl Desktop {
|
|||
|
||||
let ctx = PlatformContext::default();
|
||||
let devices = ctx.devices().unwrap();
|
||||
let dev = ctx.open_device(&devices[0].uri).unwrap();
|
||||
|
||||
if let Ok(dev) = ctx.open_device(&devices[0].uri) {
|
||||
let streams = dev.streams().unwrap();
|
||||
let stream_desc = streams[0].clone();
|
||||
let w = stream_desc.width;
|
||||
|
@ -239,7 +238,6 @@ impl Desktop {
|
|||
// Stop if camera was stopped.
|
||||
if stop_camera.load(Ordering::Relaxed) {
|
||||
stop_camera.store(false, Ordering::Relaxed);
|
||||
// Clear image.
|
||||
let mut w_image = LAST_CAMERA_IMAGE.write();
|
||||
*w_image = None;
|
||||
break;
|
||||
|
@ -259,6 +257,7 @@ impl Desktop {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
/// Last captured image from started camera.
|
||||
|
|
Loading…
Reference in a new issue