Files

33 lines
889 B
C

#include <windows.h>
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include "idmac/idmac.h"
#include "idmac/config.h"
#include "idmac/jvs.h"
void jvs_config_load(struct jvs_config *cfg, const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
cfg->enable = GetPrivateProfileIntW(L"jvs", L"enable", 1, filename);
cfg->port = GetPrivateProfileIntW(L"jvs", L"port", 2, filename);
}
void idmac_config_load(struct idmac_config *cfg, const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
cfg->dipsw = GetPrivateProfileIntW(L"idmac", L"dipsw_override", 0, filename) << 4;
cfg->dipsw |= GetPrivateProfileIntW(L"idmac", L"dipsw", 0, filename);
cfg->hook_dll = GetPrivateProfileIntW(L"idmac", L"hook_dll", 0, filename);
jvs_config_load(&cfg->jvs, filename);
}