aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-11-17 10:10:08 +0100
committerdec05eba <dec05eba@protonmail.com>2023-11-17 10:10:08 +0100
commitefa4ce618452cfe611b2876ba5218b2fbc3e0e33 (patch)
treedce272c4f440bc568e27dff99418b153be3cadf4 /src
parent69eca98086793643107a4b7073d8062fb7593f0b (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')
-rw-r--r--src/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index cf108c4..a7ad0d1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -574,17 +574,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);