mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-12-02 02:25:40 +00:00
GPU/HW: Reset state when shutting down
This commit is contained in:
parent
2c631aba5e
commit
2578f34a7c
|
@ -12,8 +12,12 @@ Log_SetChannel(GPU_HW_D3D11);
|
||||||
GPU_HW_D3D11::GPU_HW_D3D11() = default;
|
GPU_HW_D3D11::GPU_HW_D3D11() = default;
|
||||||
|
|
||||||
GPU_HW_D3D11::~GPU_HW_D3D11()
|
GPU_HW_D3D11::~GPU_HW_D3D11()
|
||||||
|
{
|
||||||
|
if (m_host_display)
|
||||||
{
|
{
|
||||||
m_host_display->SetDisplayTexture(nullptr, 0, 0, 0, 0, 0, 0, 1.0f);
|
m_host_display->SetDisplayTexture(nullptr, 0, 0, 0, 0, 0, 0, 1.0f);
|
||||||
|
ResetGraphicsAPIState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GPU_HW_D3D11::Initialize(HostDisplay* host_display, System* system, DMA* dma,
|
bool GPU_HW_D3D11::Initialize(HostDisplay* host_display, System* system, DMA* dma,
|
||||||
|
|
|
@ -10,9 +10,12 @@ Log_SetChannel(GPU_HW_OpenGL);
|
||||||
GPU_HW_OpenGL::GPU_HW_OpenGL() : GPU_HW() {}
|
GPU_HW_OpenGL::GPU_HW_OpenGL() : GPU_HW() {}
|
||||||
|
|
||||||
GPU_HW_OpenGL::~GPU_HW_OpenGL()
|
GPU_HW_OpenGL::~GPU_HW_OpenGL()
|
||||||
|
{
|
||||||
|
if (m_host_display)
|
||||||
{
|
{
|
||||||
m_host_display->SetDisplayTexture(nullptr, 0, 0, 0, 0, 0, 0, 1.0f);
|
m_host_display->SetDisplayTexture(nullptr, 0, 0, 0, 0, 0, 0, 1.0f);
|
||||||
DestroyFramebuffer();
|
ResetGraphicsAPIState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GPU_HW_OpenGL::Initialize(HostDisplay* host_display, System* system, DMA* dma,
|
bool GPU_HW_OpenGL::Initialize(HostDisplay* host_display, System* system, DMA* dma,
|
||||||
|
|
Loading…
Reference in a new issue