1
0
mirror of synced 2024-11-27 23:10:49 +01:00
bananatools/amcus/config.c

19 lines
1.0 KiB
C
Raw Normal View History

2023-01-03 05:35:53 +01:00
#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"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);
2023-01-07 06:52:08 +01:00
GetPrivateProfileStringW(L"amcus", L"am_serial", L"ABGN6789012", cfg->am_serial, _countof(cfg->am_serial), filename);
2023-01-03 05:35:53 +01:00
es3sec_config_load(&cfg->dongle, filename);
2023-01-07 06:52:08 +01:00
}