From 00a7db253c8d646da8589c94cd05e29f5e141798 Mon Sep 17 00:00:00 2001 From: Sam Jones Date: Thu, 13 May 2021 16:02:59 +0100 Subject: [PATCH] Fix lvgl-sys not respecting DEP_LV_CONFIG_PATH --- lvgl-sys/build.rs | 2 +- lvgl-sys/src/lib.rs | 4 ++-- lvgl-sys/vendor/{ => include}/lv_conf.h | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename lvgl-sys/vendor/{ => include}/lv_conf.h (100%) diff --git a/lvgl-sys/build.rs b/lvgl-sys/build.rs index 28f158f..80ac8c2 100644 --- a/lvgl-sys/build.rs +++ b/lvgl-sys/build.rs @@ -19,7 +19,7 @@ fn main() { Ok(_) => { // We've detected that we are building for docs.rs // so let's use the vendored `lv_conf.h` file. - vendor.clone() + vendor.join("include") } Err(_) => panic!( "The environment variable {} is required to be defined", diff --git a/lvgl-sys/src/lib.rs b/lvgl-sys/src/lib.rs index e824396..9e525f8 100644 --- a/lvgl-sys/src/lib.rs +++ b/lvgl-sys/src/lib.rs @@ -23,10 +23,10 @@ mod tests { lv_init(); let horizontal_resolution = lv_disp_get_hor_res(core::ptr::null_mut()); - assert_eq!(horizontal_resolution, 240); + assert_eq!(horizontal_resolution, LV_HOR_RES_MAX as i16); let vertical_resolution = lv_disp_get_ver_res(core::ptr::null_mut()); - assert_eq!(vertical_resolution, 240); + assert_eq!(vertical_resolution, LV_VER_RES_MAX as i16); } } } diff --git a/lvgl-sys/vendor/lv_conf.h b/lvgl-sys/vendor/include/lv_conf.h similarity index 100% rename from lvgl-sys/vendor/lv_conf.h rename to lvgl-sys/vendor/include/lv_conf.h -- 2.34.1