1
0
mirror of https://gitea.tendokyu.moe/Dniel97/segatools.git synced 2024-12-02 16:37:17 +01:00
segatools-dniel97/mercuryhook/config.c

76 lines
1.7 KiB
C
Raw Permalink Normal View History

2021-12-21 06:02:17 +01:00
#include <assert.h>
#include <stddef.h>
#include "board/config.h"
#include "hooklib/config.h"
#include "hooklib/dvd.h"
2022-02-10 18:17:10 +01:00
#include "gfxhook/config.h"
2021-12-21 06:02:17 +01:00
#include "mercuryhook/config.h"
#include "platform/config.h"
void mercury_dll_config_load(
struct mercury_dll_config *cfg,
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
GetPrivateProfileStringW(
L"mercuryio",
L"path",
L"",
cfg->path,
_countof(cfg->path),
filename);
}
2022-01-04 09:46:30 +01:00
void touch_config_load(
struct touch_config *cfg,
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
cfg->enable = GetPrivateProfileIntW(
2022-01-04 09:46:30 +01:00
L"touch",
L"enable",
1,
filename);
}
2023-02-13 02:40:41 +01:00
void elisabeth_config_load(
struct elisabeth_config *cfg,
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
cfg->enable = GetPrivateProfileIntW(
L"elisabeth",
L"enable",
1,
filename);
}
2021-12-21 06:02:17 +01:00
void mercury_hook_config_load(
struct mercury_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);
2022-02-10 18:17:10 +01:00
gfx_config_load(&cfg->gfx, filename);
2024-02-06 12:34:11 +01:00
vfd_config_load(&cfg->vfd, filename);
2021-12-21 06:02:17 +01:00
mercury_dll_config_load(&cfg->dll, filename);
2022-01-04 09:46:30 +01:00
touch_config_load(&cfg->touch, filename);
2023-02-13 02:40:41 +01:00
elisabeth_config_load(&cfg->elisabeth, filename);
2021-12-21 06:02:17 +01:00
}