mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-25 23:25:41 +00:00
GPU/HW: Fix possible crash (again)
This commit is contained in:
parent
cdea4eb68b
commit
cdb614a51f
|
@ -413,11 +413,16 @@ void GPU_HW::UpdateSettings(const Settings& old_settings)
|
||||||
{
|
{
|
||||||
m_pgxp_depth_buffer = g_settings.UsingPGXPDepthBuffer();
|
m_pgxp_depth_buffer = g_settings.UsingPGXPDepthBuffer();
|
||||||
m_batch.use_depth_buffer = false;
|
m_batch.use_depth_buffer = false;
|
||||||
|
|
||||||
|
// might be null when resizing
|
||||||
|
if (m_vram_texture)
|
||||||
|
{
|
||||||
if (m_pgxp_depth_buffer)
|
if (m_pgxp_depth_buffer)
|
||||||
ClearDepthBuffer();
|
ClearDepthBuffer();
|
||||||
else if (m_vram_texture) // might be null when resizing
|
else
|
||||||
UpdateDepthBufferFromMaskBit();
|
UpdateDepthBufferFromMaskBit();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UpdateSoftwareRenderer(true);
|
UpdateSoftwareRenderer(true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue