taitools/sivahook/config.c

46 lines
1.0 KiB
C
Raw Permalink Normal View History

2024-02-06 08:24:58 +00:00
#include <assert.h>
#include <stddef.h>
2024-02-11 04:38:24 +00:00
#include "sivahook/config.h"
2024-02-06 08:24:58 +00:00
#include "platform/config.h"
2024-02-11 04:38:24 +00:00
void siva_dll_config_load(
struct siva_dll_config *cfg,
2024-02-06 08:24:58 +00:00
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
GetPrivateProfileStringW(
2024-02-11 04:38:24 +00:00
L"sivaio",
2024-02-06 08:24:58 +00:00
L"path",
L"",
cfg->path,
_countof(cfg->path),
filename);
}
2024-02-14 18:38:52 +00:00
void touch_config_load(
struct touch_config *cfg,
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
cfg->enable = GetPrivateProfileIntW(L"touch", L"enable", 1, filename);
}
2024-02-11 04:38:24 +00:00
void siva_hook_config_load(
struct siva_hook_config *cfg,
2024-02-06 08:24:58 +00:00
const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
2024-02-20 07:17:12 +00:00
idmac_config_load(&cfg->idmac, filename);
2024-02-06 08:24:58 +00:00
platform_config_load(&cfg->platform, filename);
2024-02-11 04:38:24 +00:00
siva_dll_config_load(&cfg->dll, filename);
2024-02-06 08:24:58 +00:00
gfx_config_load(&cfg->gfx, filename);
2024-02-14 18:38:52 +00:00
touch_config_load(&cfg->touch, filename);
2024-02-11 04:38:24 +00:00
}