| 232 | } |
| 233 | |
| 234 | static void AutoCloseLuaProfilerScopes() |
| 235 | { |
| 236 | for (LuaProfilerScopeState* state = g_LuaProfilerScopeStates; state != 0; state = state->m_Next) |
| 237 | { |
| 238 | LuaProfilerScope scope = {0}; |
| 239 | while (!state->m_Scopes.Empty()) |
| 240 | { |
| 241 | scope = state->m_Scopes.Back(); |
| 242 | state->m_Scopes.Pop(); |
| 243 | const char* name = GetLuaProfilerScopeName(state, &scope); |
| 244 | dmLogError("Lua profiler scope '%s' was not closed before the end of the frame. Auto-closing it.", name); |
| 245 | ProfileScopeEnd(name, scope.m_NameHash); |
| 246 | state->m_Names.SetSize(scope.m_NameOffset); |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | DeleteEmptyLuaProfilerScopeStates(); |
| 251 | } |
| 252 | |
| 253 | void SetUpdateFrequency(uint32_t update_frequency) |
| 254 | { |
no test coverage detected