MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / systems_initialize

Function systems_initialize

StereoKitC/systems/system.cpp:135–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133///////////////////////////////////////////
134
135bool systems_initialize() {
136 if (!systems_sort())
137 return false;
138
139 for (int32_t i = 0; i < systems.count; i++) {
140 int32_t index = system_init_order[i];
141 if (systems[index].func_initialize != nullptr) {
142 log_diagf("Initializing %s", systems[index].name);
143
144 // start timing
145 uint64_t start = stm_now();
146
147 if (!systems[index].func_initialize()) {
148 log_errf("System %s failed to initialize!", systems[index].name);
149 return false;
150 }
151
152 // end timing
153 systems[index].profile_start_duration = stm_since(start);
154 }
155 }
156 systems_initialized = true;
157 log_info("Initialization successful");
158 return true;
159}
160
161///////////////////////////////////////////
162

Callers 1

sk_initFunction · 0.85

Calls 6

systems_sortFunction · 0.85
log_diagfFunction · 0.85
stm_nowFunction · 0.85
log_errfFunction · 0.85
stm_sinceFunction · 0.85
log_infoFunction · 0.85

Tested by

no test coverage detected