summarylogtreecommitdiffstats
path: root/libliftoff-fix.patch
blob: 095feb8d1561118a144586d103df0eccd74c4a61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- backend/drm/libliftoff.c	2024-04-26 13:32:52.000000000 -0500
+++ backend/drm/libliftoff.c	2024-06-16 20:40:31.124834546 -0500
@@ -7,6 +7,7 @@
 
 #include "backend/drm/drm.h"
 #include "backend/drm/iface.h"
+#include "config.h"
 
 static bool init(struct wlr_drm_backend *drm) {
 	// TODO: lower log level
@@ -436,7 +437,11 @@
 		goto out;
 	}
 
-	int ret = liftoff_output_apply(crtc->liftoff, req, flags);
+#if HAVE_LIBLIFTOFF_0_5
+  	int ret = liftoff_output_apply(crtc->liftoff, req, flags, NULL);
+#else
+    int ret = liftoff_output_apply(crtc->liftoff, req, flags);
+#endif
 	if (ret != 0) {
 		wlr_drm_conn_log(conn, test_only ? WLR_DEBUG : WLR_ERROR,
 			"liftoff_output_apply failed: %s", strerror(-ret));
--- backend/drm/meson.build	2024-04-26 13:32:52.000000000 -0500
+++ backend/drm/meson.build	2024-06-16 20:41:20.699571207 -0500
@@ -47,6 +47,7 @@
 
 if libliftoff.found()
 	wlr_files += files('libliftoff.c')
+	internal_config.set10('HAVE_LIBLIFTOFF_0_5', libliftoff.version().version_compare('>=0.5.0'))
 endif
 
 features += { 'drm-backend': true }