]> O.S.I.I.S - jp/vkvg.git/commitdiff
debug: vkvg-svg without c extensions
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Fri, 25 Mar 2022 14:47:17 +0000 (15:47 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Fri, 25 Mar 2022 14:47:17 +0000 (15:47 +0100)
external/vkvg-svg
tests/vkvg-svg/svg-viewer.c

index 441009b65b2e1e18b403463e9ebba17302fbefa6..d9cfafb0986819c022f47d2670e63e9cdc225417 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 441009b65b2e1e18b403463e9ebba17302fbefa6
+Subproject commit d9cfafb0986819c022f47d2670e63e9cdc225417
index b44415d59042507d0ec8d6ddadc30b511e533af7..77a2b2ca844472b3b61dafe850d3a594aabb73cf 100644 (file)
@@ -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);