| 240 | } |
| 241 | |
| 242 | static dmResource::Result GetCustomResourceSize(HContext ctx, dmhash_t path_hash, const char* path, uint32_t* resource_size) |
| 243 | { |
| 244 | // Lock should already be held |
| 245 | CustomFile* file = ctx->m_CustomFiles.Get(path_hash); |
| 246 | if (file) |
| 247 | { |
| 248 | *resource_size = file->m_Size; |
| 249 | DM_RESOURCE_DBG_LOG(3, "GetResourceSize OK: %s " DM_HASH_FMT " (%u bytes) (custom file)\n", path, path_hash, *resource_size); |
| 250 | return dmResource::RESULT_OK; |
| 251 | } |
| 252 | |
| 253 | return dmResource::RESULT_RESOURCE_NOT_FOUND; |
| 254 | } |
| 255 | |
| 256 | static dmResource::Result ReadCustomResource(HContext ctx, dmhash_t path_hash, uint8_t* buffer, uint32_t buffer_size) |
| 257 | { |