mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-22 18:30:32 +00:00
RenderBase: Return a tuple from ConvertStereoRectangle instead of using out parameters
This commit is contained in:
parent
671b5f9747
commit
c7ab6861c2
6 changed files with 30 additions and 23 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <strsafe.h>
|
||||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
@ -1173,7 +1174,7 @@ void Renderer::BlitScreen(TargetRectangle src, TargetRectangle dst, D3DTexture2D
|
|||
if (g_ActiveConfig.iStereoMode == STEREO_SBS || g_ActiveConfig.iStereoMode == STEREO_TAB)
|
||||
{
|
||||
TargetRectangle leftRc, rightRc;
|
||||
ConvertStereoRectangle(dst, leftRc, rightRc);
|
||||
std::tie(leftRc, rightRc) = ConvertStereoRectangle(dst);
|
||||
|
||||
D3D11_VIEWPORT leftVp = CD3D11_VIEWPORT((float)leftRc.left, (float)leftRc.top,
|
||||
(float)leftRc.GetWidth(), (float)leftRc.GetHeight());
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <strsafe.h>
|
||||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "Common/Align.h"
|
||||
|
@ -1203,7 +1204,7 @@ void Renderer::BlitScreen(TargetRectangle src, TargetRectangle dst, D3DTexture2D
|
|||
if (g_ActiveConfig.iStereoMode == STEREO_SBS || g_ActiveConfig.iStereoMode == STEREO_TAB)
|
||||
{
|
||||
TargetRectangle left_rc, right_rc;
|
||||
ConvertStereoRectangle(dst, left_rc, right_rc);
|
||||
std::tie(left_rc, right_rc) = ConvertStereoRectangle(dst);
|
||||
|
||||
// Swap chain backbuffer is never multisampled..
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <cstdio>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Atomic.h"
|
||||
|
@ -1181,9 +1182,9 @@ void Renderer::BlitScreen(TargetRectangle src, TargetRectangle dst, GLuint src_t
|
|||
|
||||
// Top-and-Bottom mode needs to compensate for inverted vertical screen coordinates.
|
||||
if (g_ActiveConfig.iStereoMode == STEREO_TAB)
|
||||
ConvertStereoRectangle(dst, rightRc, leftRc);
|
||||
std::tie(rightRc, leftRc) = ConvertStereoRectangle(dst);
|
||||
else
|
||||
ConvertStereoRectangle(dst, leftRc, rightRc);
|
||||
std::tie(leftRc, rightRc) = ConvertStereoRectangle(dst);
|
||||
|
||||
m_post_processor->BlitFromTexture(src, leftRc, src_texture, src_width, src_height, 0);
|
||||
m_post_processor->BlitFromTexture(src, rightRc, src_texture, src_width, src_height, 1);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <cstdio>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
|
@ -907,7 +908,7 @@ void Renderer::BlitScreen(VkRenderPass render_pass, const TargetRectangle& dst_r
|
|||
{
|
||||
TargetRectangle left_rect;
|
||||
TargetRectangle right_rect;
|
||||
ConvertStereoRectangle(dst_rect, left_rect, right_rect);
|
||||
std::tie(left_rect, right_rect) = ConvertStereoRectangle(dst_rect);
|
||||
|
||||
draw.DrawQuad(left_rect.left, left_rect.top, left_rect.GetWidth(), left_rect.GetHeight(),
|
||||
src_rect.left, src_rect.top, 0, src_rect.GetWidth(), src_rect.GetHeight(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue