mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
add RES_UNIQUE, required for sound code
This was SVN commit r1209.
This commit is contained in:
parent
13dfff0e12
commit
7a0cf92c25
2 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue