46 lines
1.0 KiB
C
46 lines
1.0 KiB
C
#include <assert.h>
|
|
#include <stddef.h>
|
|
|
|
#include "sivahook/config.h"
|
|
|
|
#include "platform/config.h"
|
|
|
|
void siva_dll_config_load(
|
|
struct siva_dll_config *cfg,
|
|
const wchar_t *filename)
|
|
{
|
|
assert(cfg != NULL);
|
|
assert(filename != NULL);
|
|
|
|
GetPrivateProfileStringW(
|
|
L"sivaio",
|
|
L"path",
|
|
L"",
|
|
cfg->path,
|
|
_countof(cfg->path),
|
|
filename);
|
|
}
|
|
|
|
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);
|
|
}
|
|
|
|
void siva_hook_config_load(
|
|
struct siva_hook_config *cfg,
|
|
const wchar_t *filename)
|
|
{
|
|
assert(cfg != NULL);
|
|
assert(filename != NULL);
|
|
|
|
idmac_config_load(&cfg->idmac, filename);
|
|
platform_config_load(&cfg->platform, filename);
|
|
siva_dll_config_load(&cfg->dll, filename);
|
|
gfx_config_load(&cfg->gfx, filename);
|
|
touch_config_load(&cfg->touch, filename);
|
|
} |