diff options
| author | Zach DeCook <zachdecook@librem.one> | 2022-01-20 20:26:34 -0500 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2022-01-20 20:26:34 -0500 |
| commit | 8a3e71164d730500105ae1de2f9a666fb11c9eae (patch) | |
| tree | cc6a73018ff540618394f188c5f9e47c43dfc2ce /keyboard.c | |
| parent | 10398d3f9a18575f328d3784beacbc1e937886b8 (diff) | |
| download | suggpicker-8a3e71164d730500105ae1de2f9a666fb11c9eae.tar.gz | |
rows: limit to 1
Diffstat (limited to 'keyboard.c')
| -rw-r--r-- | keyboard.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/keyboard.c b/keyboard.c index 2a0c982..9e97d20 100644 --- a/keyboard.c +++ b/keyboard.c @@ -12,19 +12,6 @@ fprintf(stderr, __VA_ARGS__); \ exit(1) -uint8_t -kbd_get_rows(struct layout *l) { - uint8_t rows = 0; - struct key *k = l->keys; - while (k->type != Last) { - if (k->type == EndRow) { - rows++; - } - k++; - } - return rows + 1; -} - void kbd_init(struct kbd *kb, struct layout *layouts) { int i; @@ -60,7 +47,7 @@ kbd_init(struct kbd *kb, struct layout *layouts) { void kbd_init_layout(struct layout *l, uint32_t width, uint32_t height) { uint32_t x = 0, y = 0; - uint8_t rows = kbd_get_rows(l); + uint8_t rows = 1; l->keyheight = height / rows; |
