Commit 8f47190 1 parent 69eba9c commit 8f47190 Copy full SHA for 8f47190
File tree 2 files changed +19
-8
lines changed
2 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -950,6 +950,10 @@ void correlate_to_wayland(std::vector<kms::card_descriptor_t> &cds) {
950
950
std::vector<std::string> kms_display_names () {
951
951
int count = 0 ;
952
952
953
+ if (!fs::exists (" /dev/dri" )) {
954
+ BOOST_LOG (warning) << " Couldn't find /dev/dri, kmsgrab won't be enabled" sv;
955
+ }
956
+
953
957
if (!gbm::create_device) {
954
958
BOOST_LOG (warning) << " libgbm not initialized" sv;
955
959
return {};
Original file line number Diff line number Diff line change @@ -421,14 +421,21 @@ struct x11_attr_t : public display_t {
421
421
return -1 ;
422
422
}
423
423
424
- crtc_info_t crt_info { x11::rr::GetCrtcInfo (xdisplay.get (), screenr.get (), result->crtc ) };
425
- BOOST_LOG (info)
426
- << " Streaming display: " sv << result->name << " with res " sv << crt_info->width << ' x' << crt_info->height << " offset by " sv << crt_info->x << ' x' << crt_info->y ;
427
-
428
- width = crt_info->width ;
429
- height = crt_info->height ;
430
- offset_x = crt_info->x ;
431
- offset_y = crt_info->y ;
424
+ if (result->crtc ) {
425
+ crtc_info_t crt_info { x11::rr::GetCrtcInfo (xdisplay.get (), screenr.get (), result->crtc ) };
426
+ BOOST_LOG (info)
427
+ << " Streaming display: " sv << result->name << " with res " sv << crt_info->width << ' x' << crt_info->height << " offset by " sv << crt_info->x << ' x' << crt_info->y ;
428
+
429
+ width = crt_info->width ;
430
+ height = crt_info->height ;
431
+ offset_x = crt_info->x ;
432
+ offset_y = crt_info->y ;
433
+ }
434
+ else {
435
+ BOOST_LOG (warning) << " Couldn't get requested display info, defaulting to recording entire virtual desktop" sv;
436
+ width = xattr.width ;
437
+ height = xattr.height ;
438
+ }
432
439
}
433
440
else {
434
441
width = xattr.width ;
You can’t perform that action at this time.
0 commit comments