backend: error out when missing DRM and libinput in wlr_backend_autocreate()

Instead of returning an empty multi backend, fail with a clear
error when both the DRM and libinput backends are disabled.

(cherry picked from commit fb4fb3bac2)
This commit is contained in:
Simon Ser 2022-11-23 15:52:08 +01:00
parent f1bea43ccc
commit 5f24c36d30

View file

@ -346,6 +346,11 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display) {
} }
#endif #endif
#if !(WLR_HAS_LIBINPUT_BACKEND || WLR_HAS_DRM_BACKEND)
wlr_log(WLR_ERROR, "Neither DRM nor libinput backend support is compiled in");
goto error;
#endif
// Attempt DRM+libinput // Attempt DRM+libinput
multi->session = session_create_and_wait(display); multi->session = session_create_and_wait(display);
if (!multi->session) { if (!multi->session) {