Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 294ae70d rédigé par Kubat's avatar Kubat
Parcourir les fichiers

DEBUG: More debug messages, hinib is a boolean now

parent 52aa1dc2
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -477,7 +477,8 @@ module_sdl2_load_file(struct module_sdl2_window *win, const char *filepath) ...@@ -477,7 +477,8 @@ module_sdl2_load_file(struct module_sdl2_window *win, const char *filepath)
bool ret = ! lmpv_load_file((mpv_handle *) win->mpv, filepath); bool ret = ! lmpv_load_file((mpv_handle *) win->mpv, filepath);
win->mpv_duration = 0; win->mpv_duration = 0;
win->mpv_time_pos = 0; win->mpv_time_pos = 0;
win->hinib += 1; win->hinib = true;
LOG_DEBUG("SDL2", "Hinib flag at %d", win->hinib);
return ret; return ret;
} }
......
...@@ -187,16 +187,18 @@ loop: ...@@ -187,16 +187,18 @@ loop:
return 1; return 1;
case MPV_EVENT_START_FILE: case MPV_EVENT_START_FILE:
--(*hinib); *hinib = false;
LOG_DEBUG("WINDOW", "Start of file!"); LOG_DEBUG("WINDOW", "Start of file!");
break; break;
case MPV_EVENT_END_FILE: case MPV_EVENT_END_FILE:
LOG_DEBUG("WINDOW", "End of file!"); LOG_DEBUG("WINDOW", "End of file!");
if ((*hinib) <= 0) if (((*state) != STATE_STOP) && !(*hinib))
*hinib = 0;
if (((*state) != STATE_STOP) && (*hinib <= 0))
lkt_queue_send(queue, lkt_event_play_next, NULL); 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",
*hinib, (*state == STATE_STOP) ? "STOP" : (*state == STATE_PLAY) ?
"PLAY" : (*state == STATE_PAUSE) ? "PAUSE" : "UNKNOWN");
break; break;
case MPV_EVENT_PROPERTY_CHANGE: case MPV_EVENT_PROPERTY_CHANGE:
......
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