commit a86df06235cf1e1e78949593c18302850cf9d7cd
parent edc0746f0d3abe5b4309fe79cfa0613d1fd0277a
Author: shrub <maybeshrub@gmail.com>
Date: Sun, 12 Jul 2026 00:28:38 +0000
fix driver selection
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drm.c b/drm.c
@@ -55,8 +55,10 @@ find_driver(int fd)
for (index = 0; index < ARRAY_LENGTH(drivers); ++index) {
DEBUG("Trying DRM driver `%s'\n", drivers[index]->name);
- if (drivers[index]->device_supported(vendor_id, device_id))
+ if (drivers[index]->device_supported(vendor_id, device_id)) {
driver = drivers[index];
+ break;
+ }
}
out:
diff --git a/meson.build b/meson.build
@@ -81,7 +81,7 @@ if drm.found()
dep = dependency('libdrm_' + driver, required: drivers.contains(driver))
if dep.found()
libwld_src += src
- c_args += '-DWITH_DRM_@0@=1'.format(driver)
+ c_args += '-DWITH_DRM_@0@=1'.format(driver.to_upper())
requires_private += dep
endif
endforeach