summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer.cpp
diff options
context:
space:
mode:
authorFeng Chen <VonChenPlus@gmail.com>2022-11-04 07:39:42 +0100
committerGitHub <noreply@github.com>2022-11-04 07:39:42 +0100
commit75596c07e0fc1462c2a19484e168f4944c33d3d3 (patch)
tree1aa919ea76f467c51b3fc591a72c57f5ade92560 /src/video_core/renderer_opengl/gl_rasterizer.cpp
parentUI: Add options to hide extra columns (#9093) (diff)
downloadyuzu-75596c07e0fc1462c2a19484e168f4944c33d3d3.tar
yuzu-75596c07e0fc1462c2a19484e168f4944c33d3d3.tar.gz
yuzu-75596c07e0fc1462c2a19484e168f4944c33d3d3.tar.bz2
yuzu-75596c07e0fc1462c2a19484e168f4944c33d3d3.tar.lz
yuzu-75596c07e0fc1462c2a19484e168f4944c33d3d3.tar.xz
yuzu-75596c07e0fc1462c2a19484e168f4944c33d3d3.tar.zst
yuzu-75596c07e0fc1462c2a19484e168f4944c33d3d3.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 79d7908d4..72e314d39 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -618,11 +618,11 @@ void RasterizerOpenGL::SyncViewport() {
}
flags[Dirty::Viewport0 + index] = false;
- if (!regs.viewport_transform_enabled) {
- const auto x = static_cast<GLfloat>(regs.render_area.x);
- const auto y = static_cast<GLfloat>(regs.render_area.y);
- const auto width = static_cast<GLfloat>(regs.render_area.width);
- const auto height = static_cast<GLfloat>(regs.render_area.height);
+ if (!regs.viewport_scale_offset_enbled) {
+ const auto x = static_cast<GLfloat>(regs.surface_clip.x);
+ const auto y = static_cast<GLfloat>(regs.surface_clip.y);
+ const auto width = static_cast<GLfloat>(regs.surface_clip.width);
+ const auto height = static_cast<GLfloat>(regs.surface_clip.height);
glViewportIndexedf(static_cast<GLuint>(index), x, y, width != 0.0f ? width : 1.0f,
height != 0.0f ? height : 1.0f);
continue;