d3d: Release on shutdown in headless.

Could sync it up, just want to be able to run tests without major leaks.
This commit is contained in:
Unknown W. Brackets 2014-09-07 13:31:33 -07:00
parent 858df90dff
commit 9f3deddef6
2 changed files with 9 additions and 0 deletions

View File

@ -121,5 +121,7 @@ void D3D9_Shutdown() {
device->EndScene();
device->Release();
d3d->Release();
DX9::pD3Ddevice = NULL;
DX9::pD3Ddevice = NULL;
hWnd = NULL;
}

View File

@ -25,6 +25,7 @@
#include "base/logging.h"
#include "thin3d/d3dx9_loader.h"
#include "GPU/Directx9/helper/global.h"
#include "GPU/Directx9/helper/fbo.h"
#include "file/vfs.h"
#include "file/zip_read.h"
@ -80,6 +81,12 @@ bool WindowsHeadlessHostDx9::InitGL(std::string *error_message)
void WindowsHeadlessHostDx9::ShutdownGL()
{
DX9::DestroyShaders();
DX9::fbo_shutdown();
DX9::pD3Ddevice->EndScene();
DX9::pD3Ddevice->Release();
DX9::pD3Ddevice = NULL;
hWnd = NULL;
}
bool WindowsHeadlessHostDx9::ResizeGL()