mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
feat.肉鸽新协议画饼,完成了读取配置部分的内容
This commit is contained in:
@@ -9,11 +9,18 @@ bool asst::AbstractConfiger::load(const std::string& filename)
|
||||
{
|
||||
LogTraceFunction;
|
||||
|
||||
if (!std::filesystem::exists(filename)) {
|
||||
#ifdef WIN32
|
||||
std::string cvt_filename = utils::utf8_to_gbk(filename);
|
||||
#else
|
||||
std::string cvt_filename = filename;
|
||||
#endif
|
||||
Log.info("Load:", cvt_filename);
|
||||
|
||||
if (!std::filesystem::exists(cvt_filename)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string content = utils::load_file_without_bom(filename);
|
||||
std::string content = utils::load_file_without_bom(cvt_filename);
|
||||
|
||||
auto&& ret = json::parser::parse(content);
|
||||
if (!ret) {
|
||||
|
||||
Reference in New Issue
Block a user