momento/src/input/init.c

18 lines
343 B
C

/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Copyright (C) 2021 KikooDX */
#include "input.h"
#include <gint/keycodes.h>
struct Input
input_init(void)
{
struct Input input = {
.keycodes = {KEY_LEFT, KEY_RIGHT, KEY_UP, KEY_DOWN, KEY_SHIFT},
};
int i = KEYS_COUNT;
while (i-- > 0)
input.keystates[i] = KS_UP;
return input;
}