forked from enlightenment/enlightenment
music control - handle out of bounds len/pos of playback
This commit is contained in:
parent
6ec7dd8a69
commit
9001073b0b
|
@ -405,6 +405,7 @@ prop_changed(void *data, Eldbus_Proxy *proxy EINA_UNUSED, void *event_info)
|
||||||
long long llval = 0;
|
long long llval = 0;
|
||||||
|
|
||||||
eina_value_get(value, &llval);
|
eina_value_get(value, &llval);
|
||||||
|
if (llval < 0) llval = 0;
|
||||||
ctxt->position = (double)llval / 1000000.0;
|
ctxt->position = (double)llval / 1000000.0;
|
||||||
music_control_pos_update(ctxt);
|
music_control_pos_update(ctxt);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,8 @@ _pos_update(E_Music_Control_Instance *inst)
|
||||||
msg->count = 2;
|
msg->count = 2;
|
||||||
msg->val[0] = inst->ctxt->position;
|
msg->val[0] = inst->ctxt->position;
|
||||||
msg->val[1] = inst->ctxt->meta_length;
|
msg->val[1] = inst->ctxt->meta_length;
|
||||||
|
if (msg->val[0] < 0.0) msg->val[0] = 0.0;
|
||||||
|
if (msg->val[0] > msg->val[1]) msg->val[0] = msg->val[1];
|
||||||
edje_object_message_send(inst->content_popup, EDJE_MESSAGE_FLOAT_SET, 1, msg);
|
edje_object_message_send(inst->content_popup, EDJE_MESSAGE_FLOAT_SET, 1, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue