summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorV.VamsiKrishna <vk@bsb.in>2015-03-20 11:12:13 +0530
committerV.VamsiKrishna <vk@bsb.in>2015-03-20 11:12:13 +0530
commit9965e93f7eb7297490de597cc8ed8e18b4ba2872 (patch)
tree335173ba023e8734ecd608af78e44dddf750a952 /drivers
parentd3280f91a13da6c106f95c289c095714c638d201 (diff)
Revert "Removing etc1 from build for javascript platform."
This reverts commit 41b729ccff74e5a9154bee7db0d36ffd74641eae.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/etc1/rg_etc1.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/etc1/rg_etc1.cpp b/drivers/etc1/rg_etc1.cpp
index d2959da386..7eb1427d7a 100644
--- a/drivers/etc1/rg_etc1.cpp
+++ b/drivers/etc1/rg_etc1.cpp
@@ -1918,7 +1918,11 @@ done:
int v = etc1_decode_value(diff, inten, selector, packed_c);
uint err = labs(v - static_cast<int>(color));
//printf("err: %d - %u = %u\n",v,color,err);
+ #ifdef JAVASCRIPT_ENABLED
+ if (err < best_error || best_error == cUINT32_MAX)
+ #else
if (err < best_error)
+ #endif
{
best_error = err;
best_packed_c = packed_c;