wined3d: Ignore set_priority calls on non-managed resources.

This commit is contained in:
Stefan Dösinger 2014-07-08 15:58:43 +02:00 committed by Alexandre Julliard
parent eb0daf08c6
commit 4cecbaa54d

View File

@ -163,7 +163,15 @@ void resource_unload(struct wined3d_resource *resource)
DWORD resource_set_priority(struct wined3d_resource *resource, DWORD priority)
{
DWORD prev = resource->priority;
DWORD prev;
if (resource->pool != WINED3D_POOL_MANAGED)
{
WARN("Called on non-managed resource %p, ignoring.\n", resource);
return 0;
}
prev = resource->priority;
resource->priority = priority;
TRACE("resource %p, new priority %u, returning old priority %u.\n", resource, priority, prev);
return prev;