segatools2/hkbhook/config.c

53 lines
1.2 KiB
C
Raw Normal View History

#include <assert.h>
#include <stddef.h>
#include "board/config.h"
#include "gfxhook/config.h"
#include "hooklib/config.h"
#include "hooklib/dvd.h"
#include "hkbhook/config.h"
#include "platform/config.h"
void hkb_dll_config_load(
struct hkb_dll_config *cfg,
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
GetPrivateProfileStringW(
L"hkbio",
L"path",
L"",
cfg->path,
_countof(cfg->path),
filename);
}
void hkb_led_config_load(
struct hkb_led_config *cfg,
const wchar_t *filename)
{
cfg->enable = GetPrivateProfileIntW(L"led", L"enable", 1, filename);
}
void hkb_hook_config_load(
struct hkb_hook_config *cfg,
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
platform_config_load(&cfg->platform, filename);
aime_config_load(&cfg->aime, filename);
dvd_config_load(&cfg->dvd, filename);
io4_config_load(&cfg->io4, filename);
gfx_config_load(&cfg->gfx, filename);
hkb_dll_config_load(&cfg->dll, filename);
hkb_led_config_load(&cfg->led, filename);
}