1
0
mirror of synced 2024-12-18 07:05:52 +01:00
bananatools/amcus/config.c

21 lines
1.2 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);
2023-03-10 08:53:00 +01:00
GetPrivateProfileStringW(L"amcus", L"game_cd", L"ABCD", cfg->game_cd, _countof(cfg->game_cd), filename);
2023-01-03 05:35:53 +01:00
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-02-12 20:45:41 +01:00
netenv_config_load(&cfg->netenv, filename);
2023-01-07 06:52:08 +01:00
}