Display (Linux): don't assume DP-* are external monitors

This commit is contained in:
李通洲
2023-08-10 20:58:52 +08:00
parent 978e578e7a
commit 8d7318c024
+3 -3
View File
@@ -86,8 +86,8 @@ static void waylandOutputGeometryListener(void *data,
FF_MAYBE_UNUSED int32_t physical_width,
FF_MAYBE_UNUSED int32_t physical_height,
FF_MAYBE_UNUSED int32_t subpixel,
FF_MAYBE_UNUSED const char *make,
FF_MAYBE_UNUSED const char *model,
const char *make,
const char *model,
int32_t transform)
{
WaylandDisplay* display = data;
@@ -101,7 +101,7 @@ static void waylandOutputNameListener(void *data, FF_MAYBE_UNUSED struct wl_outp
WaylandDisplay* display = data;
if(ffStrStartsWith(name, "eDP-"))
display->type = FF_DISPLAY_TYPE_BUILTIN;
else if(ffStrStartsWith(name, "HDMI-") || ffStrStartsWith(name, "DP-"))
else if(ffStrStartsWith(name, "HDMI-"))
display->type = FF_DISPLAY_TYPE_EXTERNAL;
ffStrbufAppendS(&display->name, name);
}