History

input: remove mp prefix for static functions

This makes it easy to eyeball check the call hierarchy between public and private functions.

nanahi committed 2 years ago

Commit 3cbb34f1 parent ce4294b1 file · +11 −11Browse files

Unified · Split

input/input.c+11−11
@@ -703,7 +703,7 @@ static bool process_wheel(struct input_ctx *ictx, int code, double *scale, · 702 unmodified lines
703 return true;703 return true;
704}704}
705 705
706static void mp_input_feed_key(struct input_ctx *ictx, int code, double scale,706static void feed_key(struct input_ctx *ictx, int code, double scale,
707 bool force_mouse)707 bool force_mouse)
708{708{
709 struct input_opts *opts = ictx->opts;709 struct input_opts *opts = ictx->opts;
@@ -758,7 +758,7 @@ static void mp_input_feed_key(struct input_ctx *ictx, int code, double scale, · 48 unmodified lines
758void mp_input_put_key(struct input_ctx *ictx, int code)758void mp_input_put_key(struct input_ctx *ictx, int code)
759{759{
760 input_lock(ictx);760 input_lock(ictx);
761 mp_input_feed_key(ictx, code, 1, false);761 feed_key(ictx, code, 1, false);
762 input_unlock(ictx);762 input_unlock(ictx);
763}763}
764 764
@@ -767,7 +767,7 @@ void mp_input_put_key_artificial(struct input_ctx *ictx, int code, double value) · 2 unmodified lines
767 if (value == 0.0)767 if (value == 0.0)
768 return;768 return;
769 input_lock(ictx);769 input_lock(ictx);
770 mp_input_feed_key(ictx, code, value, true);770 feed_key(ictx, code, value, true);
771 input_unlock(ictx);771 input_unlock(ictx);
772}772}
773 773
@@ -786,7 +786,7 @@ void mp_input_put_wheel(struct input_ctx *ictx, int direction, double value) · 12 unmodified lines
786 if (value == 0.0)786 if (value == 0.0)
787 return;787 return;
788 input_lock(ictx);788 input_lock(ictx);
789 mp_input_feed_key(ictx, direction, value, false);789 feed_key(ictx, direction, value, false);
790 input_unlock(ictx);790 input_unlock(ictx);
791}791}
792 792
@@ -1557,7 +1557,7 @@ struct mp_input_src_internal { · 764 unmodified lines
1557 bool drop;1557 bool drop;
1558};1558};
1559 1559
1560static struct mp_input_src *mp_input_add_src(struct input_ctx *ictx)1560static struct mp_input_src *input_add_src(struct input_ctx *ictx)
1561{1561{
1562 input_lock(ictx);1562 input_lock(ictx);
1563 if (ictx->num_sources == MP_MAX_SOURCES) {1563 if (ictx->num_sources == MP_MAX_SOURCES) {
@@ -1581,7 +1581,7 @@ static struct mp_input_src *mp_input_add_src(struct input_ctx *ictx) · 17 unmodified lines
1581 return src;1581 return src;
1582}1582}
1583 1583
1584static void mp_input_src_kill(struct mp_input_src *src);1584static void input_src_kill(struct mp_input_src *src);
1585 1585
1586static void close_input_sources(struct input_ctx *ictx)1586static void close_input_sources(struct input_ctx *ictx)
1587{1587{
@@ -1593,11 +1593,11 @@ static void close_input_sources(struct input_ctx *ictx) · 5 unmodified lines
1593 input_unlock(ictx);1593 input_unlock(ictx);
1594 if (!src)1594 if (!src)
1595 break;1595 break;
1596 mp_input_src_kill(src);1596 input_src_kill(src);
1597 }1597 }
1598}1598}
1599 1599
1600static void mp_input_src_kill(struct mp_input_src *src)1600static void input_src_kill(struct mp_input_src *src)
1601{1601{
1602 if (!src)1602 if (!src)
1603 return;1603 return;
@@ -1651,17 +1651,17 @@ static MP_THREAD_VOID input_src_thread(void *ptr) · 47 unmodified lines
1651int mp_input_add_thread_src(struct input_ctx *ictx, void *ctx,1651int mp_input_add_thread_src(struct input_ctx *ictx, void *ctx,
1652 void (*loop_fn)(struct mp_input_src *src, void *ctx))1652 void (*loop_fn)(struct mp_input_src *src, void *ctx))
1653{1653{
1654 struct mp_input_src *src = mp_input_add_src(ictx);1654 struct mp_input_src *src = input_add_src(ictx);
1655 if (!src)1655 if (!src)
1656 return -1;1656 return -1;
1657 1657
1658 void *args[] = {src, loop_fn, ctx};1658 void *args[] = {src, loop_fn, ctx};
1659 if (mp_thread_create(&src->in->thread, input_src_thread, args)) {1659 if (mp_thread_create(&src->in->thread, input_src_thread, args)) {
1660 mp_input_src_kill(src);1660 input_src_kill(src);
1661 return -1;1661 return -1;
1662 }1662 }
1663 if (mp_rendezvous(&src->in->init_done, 0) < 0) {1663 if (mp_rendezvous(&src->in->init_done, 0) < 0) {
1664 mp_input_src_kill(src);1664 input_src_kill(src);
1665 return -1;1665 return -1;
1666 }1666 }
1667 return 0;1667 return 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t