int npos = 0, nlen = 0;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
- if (pos != sd->pos) npos = 1;
- if (len != sd->len) nlen = 1;
+ if (!EINA_DBL_CMP(pos, sd->pos)) npos = 1;
+ if (!EINA_DBL_CMP(len, sd->len)) nlen = 1;
sd->pos = pos;
sd->len = len;
if (npos)
}
if (h > 0) tmp = (double)w / (double)h;
else tmp = 1.0;
- if (ratio != tmp) tmp = ratio;
- if (tmp != sd->ratio)
+ if (!EINA_DBL_CMP(ratio, tmp)) tmp = ratio;
+ if (!EINA_DBL_CMP(tmp, sd->ratio))
{
sd->ratio = tmp;
changed = 1;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
sd->open = 1;
- if (sd->remember_jump)
+ if (!EINA_DBL_CMP(sd->remember_jump, 0.0))
emotion_object_position_set(obj, sd->remember_jump);
if (sd->remember_play != sd->play)
emotion_object_play_set(obj, sd->remember_play);
Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
- if ((sd->fill.w != w) || (sd->fill.h != h))
+ if ((!EINA_DBL_CMP(sd->fill.w, w)) ||
+ (!EINA_DBL_CMP(sd->fill.h, h)))
{
Evas_Coord ow, oh;
pos = *((double *)eev->xine_event);
if ((xine_get_param(ev->stream, XINE_PARAM_SPEED) == XINE_SPEED_PAUSE) &&
- (pos == ev->pos) &&
+ (EINA_DBL_CMP(pos, ev->pos)) &&
(!ev->just_loaded))
{
xine_set_param(ev->stream, XINE_PARAM_SPEED, XINE_SPEED_NORMAL);
ev->play_ok = 1;
break;
case 15: /* get pos done */
- if (ev->last_pos != ev->pos)
+ if (!EINA_DBL_CMP(ev->last_pos, ev->pos))
{
ev->last_pos = ev->pos;
_emotion_video_pos_update(ev->obj, ev->pos, ev->len);