| 132 | } |
| 133 | |
| 134 | static void parse_platform_settings(BootConfig *config, const char *json) |
| 135 | { |
| 136 | TempAllocator4096 ta; |
| 137 | JsonObject platform(ta); |
| 138 | sjson::parse(platform, json); |
| 139 | |
| 140 | auto cur = json_object::begin(platform); |
| 141 | auto end = json_object::end(platform); |
| 142 | for (; cur != end; ++cur) { |
| 143 | JSON_OBJECT_SKIP_HOLE(platform, cur); |
| 144 | |
| 145 | if (cur->first == "save_dir") { |
| 146 | sjson::parse_string(config->save_dir, cur->second); |
| 147 | } else if (cur->first == "renderer") { |
| 148 | parse_renderer_settings(config, cur->second); |
| 149 | } else if (cur->first == "render_settings") { |
| 150 | render_settings::parse(config->render_settings, cur->second); |
| 151 | } else { |
| 152 | logw(BOOT_CONFIG |
| 153 | , "Unknown platform property '%.*s'" |
| 154 | , cur->first.length() |
| 155 | , cur->first.data() |
| 156 | ); |
| 157 | } |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | static bool is_platform_name(const StringView &key) |
| 162 | { |
no test coverage detected