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

Function GetMountByNameHash

engine/resource/src/resource_mounts.cpp:212–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212dmResource::Result GetMountByNameHash(HContext ctx, dmhash_t name_hash, SGetMountResult* mount_info)
213{
214 DM_MUTEX_SCOPED_LOCK(ctx->m_Mutex);
215 uint32_t size = ctx->m_Mounts.Size();
216 for (uint32_t i = 0; i < size; ++i)
217 {
218 ArchiveMount& mount = ctx->m_Mounts[i];
219 if (mount.m_NameHash == name_hash)
220 {
221 mount_info->m_NameHash = mount.m_NameHash;
222 mount_info->m_Archive = mount.m_Archive;
223 mount_info->m_Priority = mount.m_Priority;
224 return dmResource::RESULT_OK;
225 }
226 }
227 return dmResource::RESULT_INVAL;
228}
229
230static dmResource::Result DestroyMounts(HContext ctx)
231{

Callers 2

AddMountFunction · 0.85
TEST_FFunction · 0.85

Calls 1

SizeMethod · 0.45

Tested by 1

TEST_FFunction · 0.68