From 8d65ce5a15a999486cf1dd1a33404cd152fe4398 Mon Sep 17 00:00:00 2001 From: TTFH Date: Sun, 27 Nov 2016 16:12:18 -0300 Subject: [PATCH] Update framebuffer_layout.cpp --- src/common/framebuffer_layout.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/common/framebuffer_layout.cpp b/src/common/framebuffer_layout.cpp index dfc6e7514..126b10ce7 100644 --- a/src/common/framebuffer_layout.cpp +++ b/src/common/framebuffer_layout.cpp @@ -100,25 +100,26 @@ FramebufferLayout LargeFrameLayout(unsigned width, unsigned height, bool swapped ASSERT(height > 0); FramebufferLayout res{width, height, true, true, {}, {}}; - int viewport_height = static_cast(std::round((width - VideoCore::kScreenBottomWidth) * - TOP_SCREEN_ASPECT_RATIO)); + int viewport_height = static_cast( + std::round((width - VideoCore::kScreenBottomWidth) * TOP_SCREEN_ASPECT_RATIO)); if (height > viewport_height) { // Apply borders to the top and bottom. unsigned top_screen_bottom = viewport_height + (height - viewport_height) / 2; - res.top_screen = {0, (height - viewport_height) / 2, - width - VideoCore::kScreenBottomWidth, top_screen_bottom}; + res.top_screen = {0, (height - viewport_height) / 2, width - VideoCore::kScreenBottomWidth, + top_screen_bottom}; res.bottom_screen = {width - VideoCore::kScreenBottomWidth, - top_screen_bottom - VideoCore::kScreenBottomHeight, - width, top_screen_bottom}; + top_screen_bottom - VideoCore::kScreenBottomHeight, width, + top_screen_bottom}; } else { // Apply borders to the left and right sides of the window. - int viewport_width = static_cast(std::round((height / TOP_SCREEN_ASPECT_RATIO) + - VideoCore::kScreenBottomWidth)); - unsigned top_screen_right = (height / TOP_SCREEN_ASPECT_RATIO) + (width - viewport_width) / 2; + int viewport_width = static_cast( + std::round((height / TOP_SCREEN_ASPECT_RATIO) + VideoCore::kScreenBottomWidth)); + unsigned top_screen_right = + (height / TOP_SCREEN_ASPECT_RATIO) + (width - viewport_width) / 2; res.top_screen = {(width - viewport_width) / 2, 0, top_screen_right, height}; res.bottom_screen = {top_screen_right, height - VideoCore::kScreenBottomHeight, - top_screen_right + VideoCore::kScreenBottomWidth, height}; + top_screen_right + VideoCore::kScreenBottomWidth, height}; } if (swapped) { MathUtil::Rectangle temp = res.top_screen;