69 lines
1.6 KiB
C
69 lines
1.6 KiB
C
#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 bnusio_config_load(
|
|
struct bnusio_config *cfg,
|
|
const wchar_t *filename)
|
|
{
|
|
assert(cfg != NULL);
|
|
assert(filename != NULL);
|
|
|
|
cfg->enable = GetPrivateProfileIntW(L"bnusio", L"enable", 1, filename);
|
|
}
|
|
|
|
void qr_config_load(
|
|
struct qr_config *cfg,
|
|
const wchar_t *filename)
|
|
{
|
|
assert(cfg != NULL);
|
|
assert(filename != NULL);
|
|
|
|
cfg->enable = GetPrivateProfileIntW(L"qr", L"enable", 1, filename);
|
|
}
|
|
|
|
void network_config_load(
|
|
struct ferrum_network_config *cfg,
|
|
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);
|
|
bnusio_config_load(&cfg->bnusio, filename);
|
|
gfx_config_load(&cfg->gfx, filename);
|
|
qr_config_load(&cfg->qr, filename);
|
|
network_config_load(&cfg->network, filename);
|
|
bpreader_congif_load(&cfg->reader, filename);
|
|
}
|