diff options
Diffstat (limited to 'video/out/vo.c')
-rw-r--r-- | video/out/vo.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index 68fb7d0ee7..99efc9eec9 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -43,7 +43,6 @@ #include "video/mp_image.h" #include "video/vfcap.h" #include "sub/osd.h" -#include "sub/find_subfiles.h" // // Externally visible list of all vo drivers @@ -620,43 +619,3 @@ void vo_mouse_movement(struct vo *vo, int posx, int posy) vo_control(vo, VOCTRL_WINDOW_TO_OSD_COORDS, p); mp_input_set_mouse_pos(vo->input_ctx, p[0], p[1]); } - -static void run_cmd(struct vo *vo, const char **cmd) -{ - mp_cmd_t *cmdt = mp_input_parse_cmd_strv(vo->log, - MP_ON_OSD_AUTO, - cmd, "<window>"); - mp_input_queue_cmd(vo->input_ctx, cmdt); -} - -// Handle drag & drop event of a list of files on the VO window. -void vo_drop_files(struct vo *vo, int num_files, char **files) -{ - bool all_sub = true; - for (int i = 0; i < num_files; i++) - all_sub &= mp_might_be_subtitle_file(files[i]); - - if (all_sub) { - for (int i = 0; i < num_files; i++) { - const char *cmd[] = { - "sub_add", - files[i], - NULL - }; - run_cmd(vo, cmd); - } - } else { - for (int i = 0; i < num_files; i++) { - const char *cmd[] = { - "loadfile", - files[i], - /* Start playing the dropped files right away */ - (i == 0) ? "replace" : "append", - NULL - }; - - MP_VERBOSE(vo, "received dropped file: %s\n", files[i]); - run_cmd(vo, cmd); - } - } -} |