From c9f45ea93e470159b1bd4c4ddbd5c2c05149d76e Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 10 Oct 2014 22:58:28 +0200 Subject: input: use mpv_node parser for char** command parsers Minor simplification, also drops some useless stuff. --- input/event.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'input/event.c') diff --git a/input/event.c b/input/event.c index 661a68ecf3..add77f0b0c 100644 --- a/input/event.c +++ b/input/event.c @@ -29,22 +29,24 @@ void mp_event_drop_files(struct input_ctx *ictx, int num_files, char **files) if (all_sub) { for (int i = 0; i < num_files; i++) { const char *cmd[] = { + "osd-auto", "sub_add", files[i], NULL }; - mp_input_run_cmd(ictx, MP_ON_OSD_AUTO, cmd, ""); + mp_input_run_cmd(ictx, cmd); } } else { for (int i = 0; i < num_files; i++) { const char *cmd[] = { + "osd-auto", "loadfile", files[i], /* Start playing the dropped files right away */ (i == 0) ? "replace" : "append", NULL }; - mp_input_run_cmd(ictx, MP_ON_OSD_AUTO, cmd, ""); + mp_input_run_cmd(ictx, cmd); } } } -- cgit v1.2.3