board/config.c: Add struct aime_config

This commit is contained in:
Tau 2019-06-03 22:27:45 -04:00
parent 7b665b1288
commit 924c1d8fdb
3 changed files with 27 additions and 0 deletions

15
board/config.c Normal file
View File

@ -0,0 +1,15 @@
#include <windows.h>
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#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);
}

10
board/config.h Normal file
View File

@ -0,0 +1,10 @@
#pragma once
#include <stdbool.h>
#include <stddef.h>
struct aime_config {
bool enable;
};
void aime_config_load(struct aime_config *cfg, const wchar_t *filename);

View File

@ -7,6 +7,8 @@ board_lib = static_library(
capnhook.get_variable('hook_dep'), capnhook.get_variable('hook_dep'),
], ],
sources : [ sources : [
'config.c',
'config.h',
'guid.c', 'guid.c',
'guid.h', 'guid.h',
'io3.c', 'io3.c',