----------------------------- BootConfig::LoadFromPackage Configuration for engine bootup that cannot be modified by the user
| 35 | // Configuration for engine bootup that cannot be modified by the user |
| 36 | // |
| 37 | void BootConfig::LoadFromPackage(BootConfig& cfg, core::I_Package* const pkg) |
| 38 | { |
| 39 | std::vector<uint8> rawData; |
| 40 | if (!pkg->GetEntryData(core::HashString(s_FileName.c_str()), rawData)) |
| 41 | { |
| 42 | ET_ASSERT(false, "Failed to load boot config from package!"); |
| 43 | return; |
| 44 | } |
| 45 | |
| 46 | // convert that data to a string and deserialize it as json |
| 47 | if (!core::serialization::DeserializeFromJsonString(core::FileUtil::AsText(rawData), cfg)) |
| 48 | { |
| 49 | ET_ASSERT(false, "Failed to deserialize boot config at '%s'!", s_FileName); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | |
| 54 | } // namespace fw |
nothing calls this directly
no test coverage detected