summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2014-09-19 17:36:37 +0200
committerAlexander Preisinger <alexander.preisinger@gmail.com>2014-09-19 17:36:37 +0200
commitbe516022b60e85daa1e7faa28a6d9ca656968bb3 (patch)
tree97452bc450c31cb75fbc4603140a813ee77a18ff
parent95bb0bb6711986fc2f999738fcb1158085346872 (diff)
downloadmpv-be516022b60e85daa1e7faa28a6d9ca656968bb3.tar.bz2
mpv-be516022b60e85daa1e7faa28a6d9ca656968bb3.tar.xz
input: add function for setting repeat info
Let us set a different rate and delay. Needed for the following commit where we set rate and delay reported by weston. But only if the option native-keyrepeat is set.
-rw-r--r--input/input.c6
-rw-r--r--input/input.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/input/input.c b/input/input.c
index ea0a4c375a..13acc9e994 100644
--- a/input/input.c
+++ b/input/input.c
@@ -1508,3 +1508,9 @@ void mp_input_src_feed_cmd_text(struct mp_input_src *src, char *buf, size_t len)
}
}
}
+
+void mp_input_set_repeat_info(struct input_ctx *ictx, int rate, int delay)
+{
+ ictx->ar_rate = rate;
+ ictx->ar_delay = delay;
+}
diff --git a/input/input.h b/input/input.h
index ef8861eaf3..c37a55da1c 100644
--- a/input/input.h
+++ b/input/input.h
@@ -249,4 +249,6 @@ void mp_input_pipe_add(struct input_ctx *ictx, const char *filename);
void mp_input_joystick_add(struct input_ctx *ictx, char *dev);
void mp_input_lirc_add(struct input_ctx *ictx, char *lirc_configfile);
+void mp_input_set_repeat_info(struct input_ctx *ictx, int rate, int delay);
+
#endif /* MPLAYER_INPUT_H */