Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rageworx/fl_imgtk
Browse files Browse the repository at this point in the history
  • Loading branch information
rageworx committed May 11, 2021
2 parents 3c68aed + 2df1dd3 commit 1cdf2bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile.llvm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ RL = ranlib
LIP = lipo

# Check architecture for x86.64 or arm64.
KRNL = $(shell uname -s)
ARCH = $(shell uname -m)
KVER = $(shell uname -r | cut -d . -f1)

# FLTK place
FLTKCFG = fltk-config --use-images
Expand All @@ -31,8 +33,11 @@ OPTIMIZEOPT = -ffast-math -O3
CPUARCHOPT =

# architecture flag setting.
ifeq ($(ARCH),arm64)
CPUARCHOPT += -arch x86_64 -arch arm64
# Darwin, kernel 20 (big sur) automatically using universal binary.
ifeq ($(KRNL),Darwin)
ifeq ($(shell test $(KVER) -gt 19; echo $$?),0)
CPUARCHOPT += -arch x86_64 -arch arm64
endif
endif

CFLAGS = -I$(INCDIR) -I$(SOURCEDIR) -I$(FLTKDIR) $(DEFINEOPT) $(OPTIMIZEOPT) $(CPUARCHOPT) $(BITSOPT)
Expand Down
2 changes: 2 additions & 0 deletions src/fl_smimg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ Fl_RGB_Image* ResizeEngine::scale( Fl_RGB_Image* src, unsigned dst_width, unsign

if ( ( src->w() == dst_width) && ( src->h() == dst_height))
{
// fire-egg announced this may cause segment fault,
// let me test it -
return (Fl_RGB_Image*)src->copy();
}

Expand Down

0 comments on commit 1cdf2bf

Please sign in to comment.