From 7ea794c98c2de50be39bee6fd338071218171292 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Fri, 25 Mar 2022 15:47:17 +0100 Subject: [PATCH] debug: vkvg-svg without c extensions --- external/vkvg-svg | 2 +- tests/vkvg-svg/svg-viewer.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/external/vkvg-svg b/external/vkvg-svg index 441009b..d9cfafb 160000 --- a/external/vkvg-svg +++ b/external/vkvg-svg @@ -1 +1 @@ -Subproject commit 441009b65b2e1e18b403463e9ebba17302fbefa6 +Subproject commit d9cfafb0986819c022f47d2670e63e9cdc225417 diff --git a/tests/vkvg-svg/svg-viewer.c b/tests/vkvg-svg/svg-viewer.c index b44415d..77a2b2c 100644 --- a/tests/vkvg-svg/svg-viewer.c +++ b/tests/vkvg-svg/svg-viewer.c @@ -38,6 +38,11 @@ struct stat file_stat; static int svg_file_count; static float maxScroll; +/* not defined in c11, ok to define here only for sample */ +#ifndef DT_DIR + # define DT_DIR 4 +#endif + int _count_svg_files () { struct dirent *de; rewinddir (pCurrentDir); @@ -101,7 +106,7 @@ void readSVG (VkEngine e) { printf ("Unable to stat file: %s\n", filename); exit(EXIT_FAILURE); } - if (sb.st_mtim.tv_sec == file_stat.st_mtim.tv_sec) + if (sb.st_mtime == file_stat.st_mtime) return; file_stat = sb; newSvgSurf = vkvg_surface_create_from_svg(dev, width, height, filename); @@ -113,7 +118,7 @@ void readSVG (VkEngine e) { printf ("Unable to stat file: %s\n", tmp); exit(EXIT_FAILURE); } - if (sb.st_mtim.tv_sec == file_stat.st_mtim.tv_sec) + if (sb.st_mtime == file_stat.st_mtime) return; file_stat = sb; newSvgSurf = vkvg_surface_create_from_svg(dev, width, height, tmp); -- 2.47.3