1
0
mirror of synced 2024-11-30 16:24:27 +01:00
bananatools/amcus/config.c
2023-03-10 02:53:00 -05:00

21 lines
1.2 KiB
C

#include "amcus/amcus.h"
#include "platform/config.h"
void amcus_config_load(struct amcus_config *cfg, const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
cfg->enable = GetPrivateProfileIntW(L"amcus", L"enable", 1, filename);
GetPrivateProfileStringW(L"amcus", L"game_id", L"SXXX", cfg->game_id, _countof(cfg->game_id), filename);
GetPrivateProfileStringW(L"amcus", L"game_cd", L"ABCD", cfg->game_cd, _countof(cfg->game_cd), filename);
GetPrivateProfileStringW(L"amcus", L"am_game_ver", L"1.00", cfg->am_game_ver, _countof(cfg->am_game_ver), filename);
GetPrivateProfileStringW(L"amcus", L"cacfg_game_ver", L"00.01", cfg->cacfg_game_ver, _countof(cfg->cacfg_game_ver), filename);
GetPrivateProfileStringW(L"amcus", L"server_uri", L"localhost", cfg->server_uri, _countof(cfg->server_uri), filename);
GetPrivateProfileStringW(L"amcus", L"server_host", L"localhost", cfg->server_host, _countof(cfg->server_host), filename);
GetPrivateProfileStringW(L"amcus", L"am_serial", L"ABGN6789012", cfg->am_serial, _countof(cfg->am_serial), filename);
es3sec_config_load(&cfg->dongle, filename);
netenv_config_load(&cfg->netenv, filename);
}