Invoked when first property is initialized
| 252 | |
| 253 | // Invoked when first property is initialized |
| 254 | static void PropertyInitialize() |
| 255 | { |
| 256 | if (dmAtomicIncrement32(&g_PropertyInitialized) != 0) |
| 257 | return; |
| 258 | |
| 259 | memset(g_Properties, 0, sizeof(g_Properties)); |
| 260 | memset(g_PropertyData, 0, sizeof(g_PropertyData)); |
| 261 | |
| 262 | g_Lock = dmMutex::New(); |
| 263 | |
| 264 | g_Properties[0].m_Name = "Root"; |
| 265 | g_Properties[0].m_NameHash = dmHashString32(g_Properties[0].m_Name); |
| 266 | g_Properties[0].m_Type = PROFILE_PROPERTY_TYPE_GROUP; |
| 267 | g_Properties[0].m_Parent = PROFILE_PROPERTY_INVALID_IDX; |
| 268 | g_Properties[0].m_FirstChild = PROFILE_PROPERTY_INVALID_IDX; |
| 269 | g_Properties[0].m_Sibling = PROFILE_PROPERTY_INVALID_IDX; |
| 270 | g_PropertyData[0].m_Used = 1; // used == 0, means we won't traverse it during display |
| 271 | } |
| 272 | |
| 273 | static void ResetProperties(ProfileContext* ctx) |
| 274 | { |
no test coverage detected