commit a86df06

shrub  ·  2026-07-12 00:28:38 +0000 UTC
parent edc0746
fix driver selection
2 files changed,  +4, -2
M drm.c
M drm.c
+3, -1
 1@@ -55,8 +55,10 @@ find_driver(int fd)
 2 
 3 	for (index = 0; index < ARRAY_LENGTH(drivers); ++index) {
 4 		DEBUG("Trying DRM driver `%s'\n", drivers[index]->name);
 5-		if (drivers[index]->device_supported(vendor_id, device_id))
 6+		if (drivers[index]->device_supported(vendor_id, device_id)) {
 7 			driver = drivers[index];
 8+			break;
 9+		}
10 	}
11 
12 out:
+1, -1
1@@ -81,7 +81,7 @@ if drm.found()
2     dep = dependency('libdrm_' + driver, required: drivers.contains(driver))
3     if dep.found()
4       libwld_src += src
5-      c_args += '-DWITH_DRM_@0@=1'.format(driver)
6+      c_args += '-DWITH_DRM_@0@=1'.format(driver.to_upper())
7       requires_private += dep
8     endif
9   endforeach