38 FILE* fp = fopen(appConfigFilePath.c_str(),
"r");
39 char readBuffer[65536];
40 rapidjson::FileReadStream is(fp, readBuffer,
42 rapidjson::Document doc;
47 if (doc.HasParseError())
49 EE_CORE_TRACE(
"ERROR PARSING The WindowProps JSON");
53 if (doc.HasMember(
"title") && doc[
"title"].IsString())
55 this->
Title = doc[
"title"].GetString();
58 if (doc.HasMember(
"size"))
60 const rapidjson::Value& size = doc[
"size"];
61 if (size.HasMember(
"x") && size[
"x"].IsInt())
63 this->
Width = size[
"x"].GetInt();
65 if (size.HasMember(
"y") && size[
"y"].IsInt())
67 this->
Height = size[
"y"].GetInt();
71 if (doc.HasMember(
"vsync") && doc[
"vsync"].IsBool())
73 this->
VSync = doc[
"vsync"].GetBool();