add RES_UNIQUE, required for sound code

This was SVN commit r1209.
This commit is contained in:
janwas 2004-10-05 13:10:49 +00:00
parent 13dfff0e12
commit 7a0cf92c25
2 changed files with 4 additions and 1 deletions

View File

@ -505,7 +505,7 @@ Handle h_alloc(H_Type type, const char* fn, uint flags, ...)
if(!key)
flags |= RES_NO_CACHE; // changes scope to RES_TEMP
// check if already loaded (cached)
else
else if(!(flags & RES_UNIQUE))
{
// object already loaded?
h = h_find(type, key);

View File

@ -160,6 +160,9 @@ enum
// alias for RES_TEMP scope. the handle will not be kept open.
RES_NO_CACHE = 1,
// not cached, and will never reuse a previous instance
RES_UNIQUE = 1|16,
// the resource isn't backed by a file. the fn parameter is treated as the search key (uintptr_t)
// currently only used by mem manager
RES_KEY = 8