mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 05:45:38 +00:00
GPUDevice: Fix crash when saving state with display off
This commit is contained in:
parent
112ccd7f38
commit
edc61b0095
|
@ -984,9 +984,12 @@ bool GPUDevice::RenderScreenshot(u32 width, u32 height, const Common::Rectangle<
|
|||
|
||||
ClearRenderTarget(render_texture.get(), 0);
|
||||
|
||||
RenderDisplay(render_fb.get(), draw_rect.left, draw_rect.top, draw_rect.GetWidth(), draw_rect.GetHeight(),
|
||||
m_display_texture, m_display_texture_view_x, m_display_texture_view_y, m_display_texture_view_width,
|
||||
m_display_texture_view_height, IsUsingLinearFiltering());
|
||||
if (m_display_texture)
|
||||
{
|
||||
RenderDisplay(render_fb.get(), draw_rect.left, draw_rect.top, draw_rect.GetWidth(), draw_rect.GetHeight(),
|
||||
m_display_texture, m_display_texture_view_x, m_display_texture_view_y, m_display_texture_view_width,
|
||||
m_display_texture_view_height, IsUsingLinearFiltering());
|
||||
}
|
||||
|
||||
SetFramebuffer(nullptr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue