From 924c1d8fdb6fdf2b8acd36f8236780ee081afcd7 Mon Sep 17 00:00:00 2001 From: Tau Date: Mon, 3 Jun 2019 22:27:45 -0400 Subject: [PATCH] board/config.c: Add struct aime_config --- board/config.c | 15 +++++++++++++++ board/config.h | 10 ++++++++++ board/meson.build | 2 ++ 3 files changed, 27 insertions(+) create mode 100644 board/config.c create mode 100644 board/config.h diff --git a/board/config.c b/board/config.c new file mode 100644 index 0000000..4d67cbc --- /dev/null +++ b/board/config.c @@ -0,0 +1,15 @@ +#include + +#include +#include +#include + +#include "board/config.h" + +void aime_config_load(struct aime_config *cfg, const wchar_t *filename) +{ + assert(cfg != NULL); + assert(filename != NULL); + + cfg->enable = GetPrivateProfileIntW(L"aime", L"enable", 1, filename); +} diff --git a/board/config.h b/board/config.h new file mode 100644 index 0000000..bd0f940 --- /dev/null +++ b/board/config.h @@ -0,0 +1,10 @@ +#pragma once + +#include +#include + +struct aime_config { + bool enable; +}; + +void aime_config_load(struct aime_config *cfg, const wchar_t *filename); diff --git a/board/meson.build b/board/meson.build index 306aab0..3dcdf9f 100644 --- a/board/meson.build +++ b/board/meson.build @@ -7,6 +7,8 @@ board_lib = static_library( capnhook.get_variable('hook_dep'), ], sources : [ + 'config.c', + 'config.h', 'guid.c', 'guid.h', 'io3.c',