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

Function CheckAndGetResourceAndType

engine/resource/src/resource.cpp:853–860  ·  view source on GitHub ↗

Assumes m_LoadMutex is already held

Source from the content-addressed store, hash-verified

851
852// Assumes m_LoadMutex is already held
853static Result CheckAndGetResourceAndType(HFactory factory, const char* canonical_path, dmhash_t canonical_path_hash, void** resource_out, HResourceType* resource_type_out)
854{
855 Result r = CheckAndGetResourceFromPath(factory, canonical_path_hash, resource_out);
856 // If we found the resource, or if the result was anything other than "resource not exists", let's return
857 if (RESULT_OK == r || RESULT_RESOURCE_NOT_FOUND != r)
858 return r;
859 return CheckAndGetResourceTypeFromPath(factory, canonical_path, resource_type_out);
860}
861
862// Assumes m_LoadMutex is already held
863static Result CreateAndLoadResource(HFactory factory, const char* path, void** resource)

Callers 1

CreateAndLoadResourceFunction · 0.85

Calls 2

Tested by

no test coverage detected