Skip to content

Commit

Permalink
Fix version retrieval for FLTK 1.3.3 and older
Browse files Browse the repository at this point in the history
The Fl:api_version() method is not available on FLTK 1.3.3 and older, it
needs to use Fl::version() instead.
  • Loading branch information
rodarima committed Dec 8, 2024
1 parent 4ca80d0 commit 8169f76
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/version.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8169f76

Please sign in to comment.