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