Work around for what appears to be a race condition in the dx runtime.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3829 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
d545f94de0
commit
75ca1c85ea
1 changed files with 5 additions and 1 deletions
|
@ -530,7 +530,7 @@ static qboolean initD3D9Device(HWND hWnd, rendererstate_t *info, unsigned int de
|
||||||
char *s;
|
char *s;
|
||||||
for (s = inf.Description + strlen(inf.Description)-1; s >= inf.Description && *s <= ' '; s--)
|
for (s = inf.Description + strlen(inf.Description)-1; s >= inf.Description && *s <= ' '; s--)
|
||||||
*s = 0;
|
*s = 0;
|
||||||
Con_Printf("D3D9: %s\n", inf.Description);
|
Con_Printf("D3D9 Driver: %s\n", inf.Description);
|
||||||
|
|
||||||
vid.numpages = d3dpp.BackBufferCount;
|
vid.numpages = d3dpp.BackBufferCount;
|
||||||
|
|
||||||
|
@ -761,6 +761,10 @@ static void (D3D9_VID_DeInit) (void)
|
||||||
/*final shutdown, kill the video stuff*/
|
/*final shutdown, kill the video stuff*/
|
||||||
if (pD3DDev9)
|
if (pD3DDev9)
|
||||||
{
|
{
|
||||||
|
/*try and knock it back into windowed mode to avoid d3d bugs*/
|
||||||
|
d3dpp.Windowed = true;
|
||||||
|
IDirect3DDevice9_Reset(pD3DDev9, &d3dpp);
|
||||||
|
|
||||||
IDirect3DDevice9_Release(pD3DDev9);
|
IDirect3DDevice9_Release(pD3DDev9);
|
||||||
pD3DDev9 = NULL;
|
pD3DDev9 = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue