48 lines
1.0 KiB
C
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);
|
|
}
|