diff --git a/meson.build b/meson.build index b8131db9556d73ee8868ff17d0d4c71c8a84ea87..4fca2f2ad4e7fd5cf0f0fef0b92ff7729c99fe31 100644 --- a/meson.build +++ b/meson.build @@ -26,11 +26,11 @@ project( version : '0.0.1', license : 'MIT', meson_version : '>= 0.47', - default_options : ['c_std=c99', 'warning_level=2'] + default_options : ['c_std=gnu99', 'warning_level=2'] ) -if get_option('c_std') != 'c99' - error('c_std must be c99') +if get_option('c_std') != 'gnu99' + error('c_std must be gnu99') endif sources = files( diff --git a/texturator.c b/texturator.c index 2675244a05e29f0a1bbaf842ca9c26c7910768a6..8695a63a129552215328e8f1ff1413bb810e3b87 100644 --- a/texturator.c +++ b/texturator.c @@ -95,7 +95,9 @@ static int error_frames; static int zoom = 1; static bool full; static bool stop; +#ifdef HAVE_LIBPNG static bool png; +#endif static GLenum target; static struct size { unsigned x, y, z; @@ -600,7 +602,7 @@ static void extract_pix(uint8_t *rgba, int *slice, int *level, bool *complemente { *slice = (((float)rgba[0]) / 255.0) * 8.0; *level = (((float)rgba[1]) / 255.0) * 16.0; - *complemented = (((float)rgba[2]) / 255.0) / 0.25; + *complemented = (((float)rgba[2]) / 255.0) / 0.25 != 0.0f; } static bool probe_pix(int x, int y, int w, int h, int s, int m)