MCPcopy Create free account
hub / github.com/crownengine/crown / parse_platform_settings

Function parse_platform_settings

src/device/boot_config.cpp:134–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134static 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
161static bool is_platform_name(const StringView &key)
162{

Callers 1

parseMethod · 0.85

Calls 7

parse_renderer_settingsFunction · 0.85
parseFunction · 0.50
beginFunction · 0.50
endFunction · 0.50
parse_stringFunction · 0.50
lengthMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected