summaryrefslogtreecommitdiffstats
path: root/mp_fifo.c
diff options
context:
space:
mode:
Diffstat (limited to 'mp_fifo.c')
-rw-r--r--mp_fifo.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mp_fifo.c b/mp_fifo.c
index ffb3608fbf..701b7a0bc3 100644
--- a/mp_fifo.c
+++ b/mp_fifo.c
@@ -67,3 +67,13 @@ void mplayer_put_key(struct mp_fifo *fifo, int code)
fifo->last_down_time = now;
}
}
+
+void mplayer_put_key_utf8(struct mp_fifo *fifo, int mods, struct bstr t)
+{
+ while (t.len) {
+ int code = bstr_decode_utf8(t, &t);
+ if (code < 0)
+ break;
+ mplayer_put_key(fifo, code | mods);
+ }
+}