Initial Commit

This commit is contained in:
2023-01-02 23:35:53 -05:00
parent a302b49950
commit ceee973ad7
150 changed files with 12229 additions and 89 deletions

18
amcus/config.c Normal file
View File

@ -0,0 +1,18 @@
#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);
GetPrivateProfileStringW(L"amcus", L"am_serial", L"ABLN6789012", cfg->am_serial, _countof(cfg->am_serial), filename);
es3sec_config_load(&cfg->dongle, filename);
}