1
0
mirror of https://gitea.tendokyu.moe/Hay1tsme/segatools.git synced 2024-11-28 02:50:48 +01:00
segatools-hay1tsme/hkbhook/config.c
2024-06-08 00:43:06 -04:00

53 lines
1.2 KiB
C

#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);
}