1
0
mirror of synced 2024-12-02 17:07:17 +01:00
bananatools/taikohook/config.c

69 lines
1.6 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 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);
2023-03-16 06:45:39 +01:00
bpreader_congif_load(&cfg->reader, filename);
2023-01-03 05:35:53 +01:00
}