aboutsummaryrefslogtreecommitdiffstats
path: root/includer.c
diff options
context:
space:
mode:
authorTeddy Wing2018-08-28 21:02:51 +0200
committerTeddy Wing2018-08-28 21:02:51 +0200
commitbeea50b6c0b30b40abd292a11ded570ec50228a4 (patch)
treefb8f1a8241120313acb1f9572925531f877223da /includer.c
parente4490538e9ef33ce17a262d3981023a6809effac (diff)
downloaddome-key-map-beea50b6c0b30b40abd292a11ded570ec50228a4.tar.bz2
c_run_key_action(): Change signature to take a `Trigger`
Our new `Trigger` type groups together the two arguments this function used to take into a single type.
Diffstat (limited to 'includer.c')
-rw-r--r--includer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/includer.c b/includer.c
index 92a48cd..2c89064 100644
--- a/includer.c
+++ b/includer.c
@@ -4,8 +4,12 @@
#define SIZE 2
int main() {
- HeadphoneButton trigger[SIZE] = {HeadphoneButton_Play, HeadphoneButton_Down};
- const CKeyActionResult *result = c_run_key_action(trigger, SIZE);
+ HeadphoneButton buttons[SIZE] = {HeadphoneButton_Play, HeadphoneButton_Down};
+ Trigger trigger = {
+ .buttons = buttons,
+ .length = SIZE
+ };
+ const CKeyActionResult *result = c_run_key_action(trigger);
printf("%s", result->action);
return 0;