summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorJames Rowe <jroweboy@gmail.com>2016-05-03 08:07:17 +0200
committerJames Rowe <jroweboy@gmail.com>2016-11-05 09:55:41 +0100
commit2b1654ad9bbd8af53f22434d350704a1a1d0a285 (patch)
tree0da3cc7a1c622c1a659f4b2a8c5c08984dabd5c3 /src/video_core
parentUpdate CONTRIBUTING.md (diff)
downloadyuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar
yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar.gz
yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar.bz2
yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar.lz
yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar.xz
yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar.zst
yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 03a588364..fd0d74ace 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -390,6 +390,8 @@ void RendererOpenGL::DrawSingleScreenRotated(const ScreenInfo& screen_info, floa
*/
void RendererOpenGL::DrawScreens() {
auto layout = render_window->GetFramebufferLayout();
+ const auto& top_screen = layout.top_screen;
+ const auto& bottom_screen = layout.bottom_screen;
glViewport(0, 0, layout.width, layout.height);
glClear(GL_COLOR_BUFFER_BIT);
@@ -403,12 +405,16 @@ void RendererOpenGL::DrawScreens() {
glActiveTexture(GL_TEXTURE0);
glUniform1i(uniform_color_texture, 0);
- DrawSingleScreenRotated(screen_infos[0], (float)layout.top_screen.left,
- (float)layout.top_screen.top, (float)layout.top_screen.GetWidth(),
- (float)layout.top_screen.GetHeight());
- DrawSingleScreenRotated(screen_infos[1], (float)layout.bottom_screen.left,
- (float)layout.bottom_screen.top, (float)layout.bottom_screen.GetWidth(),
- (float)layout.bottom_screen.GetHeight());
+ if (layout.top_screen_enabled) {
+ DrawSingleScreenRotated(screen_infos[0], (float)top_screen.left,
+ (float)top_screen.top, (float)top_screen.GetWidth(),
+ (float)top_screen.GetHeight());
+ }
+ if (layout.bottom_screen_enabled) {
+ DrawSingleScreenRotated(screen_infos[1], (float)bottom_screen.left,
+ (float)bottom_screen.top, (float)bottom_screen.GetWidth(),
+ (float)bottom_screen.GetHeight());
+ }
m_current_frame++;
}