From 2d346f670e6bddc5ba9ff81b6a17bc4782c0adbd Mon Sep 17 00:00:00 2001 From: heckflosse Date: Thu, 14 Jul 2016 20:56:14 +0200 Subject: [PATCH 1/2] Fix build issue with clang --- rtengine/curves.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rtengine/curves.h b/rtengine/curves.h index a06502c71..348772075 100644 --- a/rtengine/curves.h +++ b/rtengine/curves.h @@ -249,7 +249,11 @@ public: #ifdef __SSE2__ static inline vfloat igamma (vfloat x, vfloat gamma, vfloat start, vfloat slope, vfloat mul, vfloat add) { +#if !defined(__clang__) return (x <= start * slope ? x / slope : xexpf(xlogf((x + add) / mul) * gamma) ); +#else + return vself(vmaskf_le(x, start * slope), x / slope, xexpf(xlogf((x + add) / mul) * gamma)); +#endif } #endif static inline float hlcurve (const float exp_scale, const float comp, const float hlrange, float level) From 0608ad8f49fc80f3122688688f778537895c8b3a Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Fri, 15 Jul 2016 01:16:12 +0200 Subject: [PATCH 2/2] Simplified OS X GIMP and Photoshop calling code. --- rtgui/extprog.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rtgui/extprog.cc b/rtgui/extprog.cc index 4f0018ab9..06f99826d 100644 --- a/rtgui/extprog.cc +++ b/rtgui/extprog.cc @@ -250,7 +250,10 @@ bool ExtProgStore::openInGimp (const Glib::ustring& fileName) #elif defined __APPLE__ - auto cmdLine = Glib::ustring("open -a /Applications/GIMP.app \'") + fileName + Glib::ustring("\'"); + // Apps should be opened using the simplest, case-insensitive form, "open -a NameOfProgram" + // Calling the executable directly is said to often cause trouble, + // https://discuss.pixls.us/t/affinity-photo-as-external-editor-how-to/1756/18 + auto cmdLine = Glib::ustring("open -a GIMP \'") + fileName + Glib::ustring("\'"); auto success = spawnCommandAsync (cmdLine); #else @@ -279,7 +282,7 @@ bool ExtProgStore::openInGimp (const Glib::ustring& fileName) #elif defined __APPLE__ - cmdLine = Glib::ustring("open -a /Applications/Gimp.app/Contents/Resources/start \'") + fileName + Glib::ustring("\'"); + cmdLine = Glib::ustring("open -a GIMP-dev \'") + fileName + Glib::ustring("\'"); success = ExtProgStore::spawnCommandAsync (cmdLine); #else @@ -301,7 +304,7 @@ bool ExtProgStore::openInPhotoshop (const Glib::ustring& fileName) #elif defined __APPLE__ - const auto cmdLine = Glib::ustring("open -a \'") + Glib::build_filename(options.psDir, "Photoshop.app\' ") + Glib::ustring("\'") + fileName + Glib::ustring("\'"); + const auto cmdLine = Glib::ustring("open -a Photoshop \'") + fileName + Glib::ustring("\'"); #else