mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
@@ -307,14 +307,11 @@ static int kms_get_fb(gsr_drm *drm, gsr_kms_response *response, connector_to_crt
|
||||
goto next;
|
||||
}
|
||||
|
||||
if(!plane->fb_id) {
|
||||
fprintf(stderr, "no fb id\n");
|
||||
if(!plane->fb_id)
|
||||
goto next;
|
||||
}
|
||||
|
||||
drmfb = drmModeGetFB2(drm->drmfd, plane->fb_id);
|
||||
if(!drmfb) {
|
||||
fprintf(stderr, "failed to get drm fb\n");
|
||||
// Commented out for now because we get here if the cursor is moved to another monitor and we dont care about the cursor
|
||||
//response->result = KMS_RESULT_FAILED_TO_GET_PLANE;
|
||||
//snprintf(response->err_msg, sizeof(response->err_msg), "drmModeGetFB2 failed, error: %s", strerror(errno));
|
||||
@@ -334,10 +331,8 @@ static int kms_get_fb(gsr_drm *drm, gsr_kms_response *response, connector_to_crt
|
||||
|
||||
int x = 0, y = 0, src_x = 0, src_y = 0, src_w = 0, src_h = 0;
|
||||
plane_property_mask property_mask = plane_get_properties(drm->drmfd, plane->plane_id, &x, &y, &src_x, &src_y, &src_w, &src_h);
|
||||
if(!(property_mask & PLANE_PROPERTY_IS_PRIMARY) && !(property_mask & PLANE_PROPERTY_IS_CURSOR)) {
|
||||
fprintf(stderr, "No property mask\n");
|
||||
if(!(property_mask & PLANE_PROPERTY_IS_PRIMARY) && !(property_mask & PLANE_PROPERTY_IS_CURSOR))
|
||||
continue;
|
||||
}
|
||||
|
||||
int fb_fds[GSR_KMS_MAX_DMA_BUFS];
|
||||
const int num_fb_fds = drm_prime_handles_to_fds(drm, drmfb, fb_fds);
|
||||
@@ -383,8 +378,6 @@ static int kms_get_fb(gsr_drm *drm, gsr_kms_response *response, connector_to_crt
|
||||
}
|
||||
++response->num_items;
|
||||
|
||||
fprintf(stderr, "got valid drm fd: %u, %u\n", drmfb->width, drmfb->height);
|
||||
|
||||
cleanup_handles:
|
||||
drm_mode_cleanup_handles(drm->drmfd, drmfb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user