1
0
mirror of synced 2024-12-18 07:05:52 +01:00
bananatools/taikohook/config.c

50 lines
1.1 KiB
C
Raw Normal View History

2023-01-03 05:35:53 +01:00
#include <assert.h>
#include <stddef.h>
#include "taikohook/config.h"
#include "platform/config.h"
void taiko_dll_config_load(
struct taiko_dll_config *cfg,
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
GetPrivateProfileStringW(
L"taikoio",
L"path",
L"",
cfg->path,
_countof(cfg->path),
filename);
}
void network_config_load(
struct taiko_network_config *cfg,
2023-01-03 05:35:53 +01:00
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
cfg->enable = GetPrivateProfileIntW(L"network", L"enable", 1, filename);
}
void taiko_hook_config_load(
struct taiko_hook_config *cfg,
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
platform_config_load(&cfg->platform, filename);
taiko_dll_config_load(&cfg->dll, filename);
gfx_config_load(&cfg->gfx, filename);
qr_config_load(&cfg->qr, filename);
network_config_load(&cfg->network, filename);
bpreader_config_load(&cfg->reader, filename);
usio_config_load(&cfg->usio, filename);
2023-01-03 05:35:53 +01:00
}