From 8169f76a3b95f07fd84bdc4aed41deb87973fb9a Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Sun, 8 Dec 2024 20:12:14 +0100 Subject: [PATCH] Fix version retrieval for FLTK 1.3.3 and older The Fl:api_version() method is not available on FLTK 1.3.3 and older, it needs to use Fl::version() instead. --- src/version.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/version.cc b/src/version.cc index f0dc9e93..f118c202 100644 --- a/src/version.cc +++ b/src/version.cc @@ -37,7 +37,11 @@ static void print_libs() /* FLTK only offers a single number */ { +#if FL_MAJOR_VERSION == 1 && FL_MINOR_VERSION == 3 && FL_PATCH_VERSION <= 3 + int fltkver = Fl::version(); +#else int fltkver = Fl::api_version(); +#endif int fltk_maj = fltkver / 10000; int fltk_min = (fltkver / 100) % 100; int fltk_pat = fltkver % 100;