2023-01-03 05:35:53 +01:00
|
|
|
#include <assert.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
#include "ferrumhook/config.h"
|
|
|
|
|
|
|
|
#include "platform/config.h"
|
|
|
|
|
|
|
|
void ferrum_dll_config_load(
|
|
|
|
struct ferrum_dll_config *cfg,
|
|
|
|
const wchar_t *filename)
|
|
|
|
{
|
|
|
|
assert(cfg != NULL);
|
|
|
|
assert(filename != NULL);
|
|
|
|
|
|
|
|
GetPrivateProfileStringW(
|
|
|
|
L"ferrumio",
|
|
|
|
L"path",
|
|
|
|
L"",
|
|
|
|
cfg->path,
|
|
|
|
_countof(cfg->path),
|
|
|
|
filename);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ferrum_xinput_config_load(
|
|
|
|
struct ferrum_xinput_config *cfg,
|
|
|
|
const wchar_t *filename)
|
|
|
|
{
|
|
|
|
assert(cfg != NULL);
|
|
|
|
assert(filename != NULL);
|
|
|
|
|
|
|
|
cfg->enable = GetPrivateProfileIntW(L"xinput", L"enable", 1, filename);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ferrum_hook_config_load(
|
|
|
|
struct ferrum_hook_config *cfg,
|
|
|
|
const wchar_t *filename)
|
|
|
|
{
|
|
|
|
assert(cfg != NULL);
|
|
|
|
assert(filename != NULL);
|
|
|
|
|
|
|
|
platform_config_load(&cfg->platform, filename);
|
|
|
|
ferrum_dll_config_load(&cfg->dll, filename);
|
|
|
|
ferrum_xinput_config_load(&cfg->xinput, filename);
|
|
|
|
gfx_config_load(&cfg->gfx, filename);
|
2023-07-11 05:21:36 +02:00
|
|
|
bpreader_config_load(&cfg->reader, filename);
|
2023-01-03 05:35:53 +01:00
|
|
|
}
|