summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2010-05-21 12:33:08 +0000
committerphintuka <phintuka>2010-05-21 12:33:08 +0000
commitf2f99a926de0f40a00376c3184e25f3c4cff39a9 (patch)
tree59395d968c5e91daced1c9b606330b88bfedc081
parent295bb1f9880a5069ddbbdd5a941f4aa698ffb7a2 (diff)
downloadxineliboutput-f2f99a926de0f40a00376c3184e25f3c4cff39a9.tar.gz
xineliboutput-f2f99a926de0f40a00376c3184e25f3c4cff39a9.tar.bz2
Floating point variables cannot be reliable compared using '!<float>'.
(Thanks to Winfried Koehler)
-rw-r--r--xine_sxfe_frontend.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xine_sxfe_frontend.c b/xine_sxfe_frontend.c
index 94ca20e2..b9db2a96 100644
--- a/xine_sxfe_frontend.c
+++ b/xine_sxfe_frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_sxfe_frontend.c,v 1.120 2010-05-21 12:21:05 phintuka Exp $
+ * $Id: xine_sxfe_frontend.c,v 1.121 2010-05-21 12:33:08 phintuka Exp $
*
*/
@@ -15,6 +15,7 @@
#include <sys/ipc.h>
#include <sys/shm.h>
#include <math.h>
+#include <float.h> /* DBL_MIN */
/* X11 */
#include <X11/Xlib.h>
@@ -532,9 +533,9 @@ static void xrender_surf_blend(Display *dpy, Xrender_Surf *src, Xrender_Surf *ds
{
XTransform xf;
- if(!scale_x)
+ if (scale_x <= 2.0 * DBL_MIN)
scale_x = 1;
- if(!scale_y)
+ if (scale_y <= 2.0 * DBL_MIN)
scale_y = 1;
xf.matrix[0][0] = XDoubleToFixed(1.0 / scale_x); xf.matrix[0][1] = 0; xf.matrix[0][2] = 0;