summaryrefslogtreecommitdiffstats
path: root/input/event.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:13:15 +0000
commitbff6c10f6909412899de6ab7c902f96080905550 (patch)
tree616d06233c652837e0d36657306ed0c157821a9a /input/event.c
parentReleasing progress-linux version 0.37.0-1~progress7.99u1. (diff)
downloadmpv-bff6c10f6909412899de6ab7c902f96080905550.tar.xz
mpv-bff6c10f6909412899de6ab7c902f96080905550.zip
Merging upstream version 0.38.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'input/event.c')
-rw-r--r--input/event.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/input/event.c b/input/event.c
index 266e029..6c1e004 100644
--- a/input/event.c
+++ b/input/event.c
@@ -37,6 +37,21 @@ void mp_event_drop_files(struct input_ctx *ictx, int num_files, char **files,
};
mp_input_run_cmd(ictx, cmd);
}
+ } else if (action == DND_INSERT_NEXT) {
+ /* To insert the entries in the correct order, we iterate over them
+ backwards */
+ for (int i = num_files - 1; i >= 0; i--) {
+ const char *cmd[] = {
+ "osd-auto",
+ "loadfile",
+ files[i],
+ /* Since we're inserting in reverse, wait til the final item
+ is added to start playing */
+ (i > 0) ? "insert-next" : "insert-next-play",
+ NULL
+ };
+ mp_input_run_cmd(ictx, cmd);
+ }
} else {
for (int i = 0; i < num_files; i++) {
const char *cmd[] = {