mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[host] dxgi: fix failure to reset texture state on fast restarts
This commit is contained in:
parent
a0fd03d328
commit
accf300c6c
@ -885,11 +885,20 @@ static bool dxgi_deinit(void)
|
|||||||
for (int i = 0; i < this->maxTextures; ++i)
|
for (int i = 0; i < this->maxTextures; ++i)
|
||||||
{
|
{
|
||||||
Texture * tex = &this->texture[i];
|
Texture * tex = &this->texture[i];
|
||||||
if (!tex->map)
|
switch(tex->state)
|
||||||
continue;
|
{
|
||||||
|
case TEXTURE_STATE_MAPPED:
|
||||||
this->backend->unmapTexture(i);
|
this->backend->unmapTexture(i);
|
||||||
tex->map = NULL;
|
tex->map = NULL;
|
||||||
|
//fallthrough
|
||||||
|
|
||||||
|
case TEXTURE_STATE_PENDING_MAP:
|
||||||
tex->state = TEXTURE_STATE_UNUSED;
|
tex->state = TEXTURE_STATE_UNUSED;
|
||||||
|
//fallthrough
|
||||||
|
|
||||||
|
case TEXTURE_STATE_UNUSED:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->dup && *this->dup)
|
if (this->dup && *this->dup)
|
||||||
|
Loading…
Reference in New Issue
Block a user