about summary refs log tree commit diff stats
path: root/source/link.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/link.c')
-rw-r--r--source/link.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source/link.c b/source/link.c new file mode 100644 index 0000000..4178293 --- /dev/null +++ b/source/link.c
@@ -0,0 +1,22 @@
1/*
2 * Copyright (C) 2017 hatkirby
3 *
4 * This software may be modified and distributed under the terms
5 * of the MIT license. See the LICENSE file for details.
6 */
7#include "link.h"
8
9u32 waitForButtons(u32 mask)
10{
11 for (;;)
12 {
13 PAD_ScanPads();
14 VIDEO_WaitVSync();
15
16 u32 btns = PAD_ButtonsDown(0);
17 if (btns & mask)
18 {
19 return btns;
20 }
21 }
22}