1
0
mirror of synced 2024-12-18 07:05:52 +01:00
bananatools/mkachook/config.c
Kevin Trocolli 8ff356b84c add games
2023-09-18 04:05:22 -04:00

48 lines
1.0 KiB
C

#include <assert.h>
#include <stddef.h>
#include "mkachook/config.h"
#include "platform/config.h"
void mkac_dll_config_load(
struct mkac_dll_config *cfg,
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
GetPrivateProfileStringW(
L"mkacio",
L"path",
L"",
cfg->path,
_countof(cfg->path),
filename);
}
void mkac_xinput_config_load(
struct mkac_xinput_config *cfg,
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
cfg->enable = GetPrivateProfileIntW(L"xinput", L"enable", 1, filename);
}
void mkac_hook_config_load(
struct mkac_hook_config *cfg,
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
platform_config_load(&cfg->platform, filename);
mkac_dll_config_load(&cfg->dll, filename);
mkac_xinput_config_load(&cfg->xinput, filename);
gfx_config_load(&cfg->gfx, filename);
bpreader_config_load(&cfg->reader, filename);
}