Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 528640da rédigé par Elliu's avatar Elliu
Parcourir les fichiers

Fix next kara when reaching end of file

parent 1b1562cb
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!186Add the Qt window module as an alternative to the SDL2 module
......@@ -134,7 +134,6 @@ MpvWidget::handle_mpv_event(mpv_event *event)
case MPV_EVENT_PAUSE:
lkt_queue_send(m_queue, LKT_EVENT_PLAY_TOGGLE, LKT_PLAY_PAUSE);
break;
case MPV_EVENT_UNPAUSE:
lkt_queue_send(m_queue, LKT_EVENT_PLAY_TOGGLE, LKT_PLAY_PLAY);
break;
......@@ -145,25 +144,13 @@ MpvWidget::handle_mpv_event(mpv_event *event)
break;
case MPV_EVENT_START_FILE:
//SET_STATE_FLAG(*(arg->state), PLAY);
//*(arg->hinib) = false;
m_inhib = false;
LOG_DEBUG("WINDOW", "Start of file!");
break;
case MPV_EVENT_END_FILE:
//LOG_DEBUG("WINDOW", "End of file!");
//if (((*(arg->state)) != STATE_STOP) && !(*(arg->hinib))) {
// LOG_DEBUG("WINDOW", "Send play_next event");
// lkt_queue_send(queue, LKT_EVENT_PLAY_NEXT, NULL);
//} else
// LOG_DEBUG("WINDOW", "Don't send play_next event, hinib is %d and state is %s",
// *(arg->hinib),
// (*(arg->state) == STATE_STOP) ? "STOP"
// : (*(arg->state) == STATE_PLAY) ? "PLAY"
// : (*(arg->state) == STATE_PAUSE) ? "PAUSE"
// : "UNKNOWN");
LOG_DEBUG("WINDOW", "End of file!");
//lkt_queue_send(m_queue, LKT_EVENT_PLAY_NEXT, NULL);
if (!m_inhib)
lkt_queue_send(m_queue, LKT_EVENT_PLAY_NEXT, nullptr);
break;
case MPV_EVENT_PROPERTY_CHANGE: {
......@@ -274,6 +261,7 @@ bool
MpvWidget::load_file(const char *filepath)
{
const bool ret = !lmpv_load_file(mpv, filepath);
m_inhib = true;
if (ret) {
LOG_DEBUG("WINDOW", "Loaded file: %s", filepath);
......
......@@ -38,6 +38,7 @@ private:
int m_position;
int m_duration;
bool m_oscVisible = false;
bool m_inhib = false;
protected:
void keyPressEvent(QKeyEvent* event);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter