diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-03-25 15:47:17 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-03-25 15:47:17 +0100 |
| commit | 7ea794c98c2de50be39bee6fd338071218171292 (patch) | |
| tree | ddbc81081d25fb5051b1e9fbfa3f16b744815d16 | |
| parent | 5454492c144aee21a988be8f55da33eda4dfce7c (diff) | |
debug: vkvg-svg without c extensions
| m--------- | external/vkvg-svg | 0 | ||||
| -rw-r--r-- | tests/vkvg-svg/svg-viewer.c | 9 |
2 files changed, 7 insertions, 2 deletions
diff --git a/external/vkvg-svg b/external/vkvg-svg -Subproject 441009b65b2e1e18b403463e9ebba17302fbefa +Subproject d9cfafb0986819c022f47d2670e63e9cdc22541 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); |