From af809f06d473c98539323e7f1b0b3bdd0c293588 Mon Sep 17 00:00:00 2001 From: "Lars A. Doucet" Date: Mon, 28 Dec 2015 20:51:48 -0600 Subject: [PATCH] proper cpp || neko guard for CFFI --- lime/graphics/utils/ImageDataUtil.hx | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/lime/graphics/utils/ImageDataUtil.hx b/lime/graphics/utils/ImageDataUtil.hx index 1e5ed2f31..c6f6a47ff 100644 --- a/lime/graphics/utils/ImageDataUtil.hx +++ b/lime/graphics/utils/ImageDataUtil.hx @@ -1094,12 +1094,10 @@ class ImageDataUtil { var pixelMask:Int, i, test; - if (CFFI.enabled) { - - hits = lime_image_data_util_threshold_inner_loop (destImage, sourceImage, sourceRect, mask, thresholdRGBA, operationEnum, colorRGBA, new Rectangle(0, 0, sourceRect.width, sourceRect.height)); - - } - else { + #if ((cpp || neko) && !disable_cffi && !macro) + if (CFFI.enabled) hits = lime_image_data_util_threshold_inner_loop (destImage, sourceImage, sourceRect, mask, thresholdRGBA, operationEnum, colorRGBA, new Rectangle(0, 0, sourceRect.width, sourceRect.height)); else + #end + { hits = __threshold_inner_loop (destImage, sourceImage, sourceRect, mask, thresholdRGBA, operationEnum, colorRGBA, 0, 0, Std.int(sourceRect.width), Std.int(sourceRect.height)); @@ -1165,12 +1163,10 @@ class ImageDataUtil { var pixelMask:Int, i, test; - if (CFFI.enabled) { - - hits = lime_image_data_util_threshold_inner_loop (destImage, sourceImage, sourceRect, mask, thresholdRGBA, operationEnum, cast colorRGBA, new Rectangle(sx, sy, dw, dh)); - - } - else { + #if ((cpp || neko) && !disable_cffi && !macro) + if (CFFI.enabled) hits = lime_image_data_util_threshold_inner_loop (destImage, sourceImage, sourceRect, mask, thresholdRGBA, operationEnum, cast colorRGBA, new Rectangle(sx, sy, dw, dh)); else + #end + { hits = __threshold_inner_loop (destImage, sourceImage, sourceRect, mask, thresholdRGBA, operationEnum, colorRGBA, sx, sy, dw, dh);