MCPcopy Create free account
hub / github.com/defold/defold / GetExtensionFromType

Function GetExtensionFromType

engine/resource/src/resource.cpp:1362–1377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1360}
1361
1362Result GetExtensionFromType(HFactory factory, HResourceType type, const char** extension)
1363{
1364 for (uint32_t i = 0; i < factory->m_ResourceTypesCount; ++i)
1365 {
1366 ResourceType* rt = &factory->m_ResourceTypes[i];
1367
1368 if (rt == type)
1369 {
1370 *extension = rt->m_Extension;
1371 return RESULT_OK;
1372 }
1373 }
1374
1375 *extension = 0;
1376 return RESULT_UNKNOWN_RESOURCE_TYPE;
1377}
1378
1379
1380Result GetDescriptorByHash(HFactory factory, dmhash_t path_hash, HResourceDescriptor* descriptor)

Callers 1

TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.68