aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-11-17 10:09:51 +0100
committerdec05eba <dec05eba@protonmail.com>2023-11-17 10:09:51 +0100
commita629c0bfb3ff14199e503bfc3f88cd7630bd6d02 (patch)
treee25047a498af07918112cca10052f19c3b2041eb /src/utils.c
parentd548d2fe18463a465d547721180d0c12cbc256eb (diff)
Make amd/intel nvidia/wayland capture display match x11 connector name, allow screen capture on amd/intel nvidia/wayland (select the first output for now)
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/utils.c b/src/utils.c
index db0bd6f..94b0037 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -137,17 +137,17 @@ static void for_each_active_monitor_output_drm(const char *drm_card_path, active
if(!connector)
continue;
- if(connector->connection != DRM_MODE_CONNECTED) {
- drmModeFreeConnector(connector);
- continue;
- }
-
drm_connector_type_count *connector_type = drm_connector_types_get_index(type_counts, &num_type_counts, connector->connector_type);
const char *connection_name = drmModeGetConnectorTypeName(connector->connector_type);
const int connection_name_len = strlen(connection_name);
if(connector_type)
++connector_type->count;
+ if(connector->connection != DRM_MODE_CONNECTED) {
+ drmModeFreeConnector(connector);
+ continue;
+ }
+
uint64_t crtc_id = 0;
connector_get_property_by_name(fd, connector, "CRTC_ID", &crtc_id);