System: Support saving screenshots in save states

This commit is contained in:
Connor McLaughlin
2020-04-21 02:50:45 +10:00
parent aaf9dcaf02
commit 08c8d1a521
10 changed files with 286 additions and 47 deletions

View File

@ -477,7 +477,7 @@ void D3D11DisplayWidget::renderDisplay()
if (!m_display_texture_handle)
return;
auto [vp_left, vp_top, vp_width, vp_height] = CalculateDrawRect();
auto [vp_left, vp_top, vp_width, vp_height] = CalculateDrawRect(m_window_width, m_window_height, m_display_top_margin);
m_context->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
m_context->VSSetShader(m_display_vertex_shader.Get(), nullptr, 0);

View File

@ -494,7 +494,7 @@ void OpenGLDisplayWidget::renderDisplay()
if (!m_display_texture_handle)
return;
const auto [vp_left, vp_top, vp_width, vp_height] = CalculateDrawRect();
const auto [vp_left, vp_top, vp_width, vp_height] = CalculateDrawRect(m_window_width, m_window_height, m_display_top_margin);
glViewport(vp_left, m_window_height - (m_display_top_margin + vp_top) - vp_height, vp_width, vp_height);
glDisable(GL_BLEND);