72 lines
1.5 KiB
C
72 lines
1.5 KiB
C
#include <assert.h>
|
|
#include <stddef.h>
|
|
|
|
#include "saohook/config.h"
|
|
|
|
#include "platform/config.h"
|
|
|
|
void sao_dll_config_load(
|
|
struct sao_dll_config *cfg,
|
|
const wchar_t *filename)
|
|
{
|
|
assert(cfg != NULL);
|
|
assert(filename != NULL);
|
|
|
|
GetPrivateProfileStringW(
|
|
L"saoio",
|
|
L"path",
|
|
L"",
|
|
cfg->path,
|
|
_countof(cfg->path),
|
|
filename);
|
|
}
|
|
|
|
void systype_config_load(
|
|
struct systype_config *cfg,
|
|
const wchar_t *filename)
|
|
{
|
|
cfg->enable = GetPrivateProfileIntW(
|
|
L"systype",
|
|
L"enable",
|
|
1,
|
|
filename
|
|
);
|
|
|
|
cfg->type = GetPrivateProfileIntW(
|
|
L"systype",
|
|
L"type",
|
|
0,
|
|
filename
|
|
);
|
|
}
|
|
|
|
void sao_touch_config_load(
|
|
struct sao_touch_config *cfg,
|
|
const wchar_t *filename)
|
|
{
|
|
cfg->enable = GetPrivateProfileIntW(
|
|
L"touch",
|
|
L"enable",
|
|
1,
|
|
filename
|
|
);
|
|
}
|
|
|
|
void sao_hook_config_load(
|
|
struct sao_hook_config *cfg,
|
|
const wchar_t *filename)
|
|
{
|
|
assert(cfg != NULL);
|
|
assert(filename != NULL);
|
|
|
|
aime_config_load(&cfg->aime, filename);
|
|
platform_config_load(&cfg->platform, filename);
|
|
sao_dll_config_load(&cfg->dll, filename);
|
|
gfx_config_load(&cfg->gfx, filename);
|
|
qr_config_load(&cfg->qr, filename);
|
|
usio_config_load(&cfg->usio, filename);
|
|
systype_config_load(&cfg->systype, filename);
|
|
sao_touch_config_load(&cfg->touch, filename);
|
|
vfd_config_load(&cfg->vfd, filename);
|
|
}
|