summaryrefslogtreecommitdiffstats
path: root/src/core/frontend/framebuffer_layout.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-02-27 04:47:49 +0100
committerLioncash <mathew1800@gmail.com>2019-02-27 09:38:39 +0100
commitb9238edd0d0bfa7c88ad81ef00347b5194ebed77 (patch)
tree73cbfa304b41edc3fc92f7b8e9bfb8832f701d49 /src/core/frontend/framebuffer_layout.cpp
parentcommon/vector_math: Move Vec[x] types into the Common namespace (diff)
downloadyuzu-b9238edd0d0bfa7c88ad81ef00347b5194ebed77.tar
yuzu-b9238edd0d0bfa7c88ad81ef00347b5194ebed77.tar.gz
yuzu-b9238edd0d0bfa7c88ad81ef00347b5194ebed77.tar.bz2
yuzu-b9238edd0d0bfa7c88ad81ef00347b5194ebed77.tar.lz
yuzu-b9238edd0d0bfa7c88ad81ef00347b5194ebed77.tar.xz
yuzu-b9238edd0d0bfa7c88ad81ef00347b5194ebed77.tar.zst
yuzu-b9238edd0d0bfa7c88ad81ef00347b5194ebed77.zip
Diffstat (limited to '')
-rw-r--r--src/core/frontend/framebuffer_layout.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/frontend/framebuffer_layout.cpp b/src/core/frontend/framebuffer_layout.cpp
index f8662d193..a1357179f 100644
--- a/src/core/frontend/framebuffer_layout.cpp
+++ b/src/core/frontend/framebuffer_layout.cpp
@@ -12,12 +12,12 @@ namespace Layout {
// Finds the largest size subrectangle contained in window area that is confined to the aspect ratio
template <class T>
-static MathUtil::Rectangle<T> maxRectangle(MathUtil::Rectangle<T> window_area,
- float screen_aspect_ratio) {
+static Common::Rectangle<T> MaxRectangle(Common::Rectangle<T> window_area,
+ float screen_aspect_ratio) {
float scale = std::min(static_cast<float>(window_area.GetWidth()),
window_area.GetHeight() / screen_aspect_ratio);
- return MathUtil::Rectangle<T>{0, 0, static_cast<T>(std::round(scale)),
- static_cast<T>(std::round(scale * screen_aspect_ratio))};
+ return Common::Rectangle<T>{0, 0, static_cast<T>(std::round(scale)),
+ static_cast<T>(std::round(scale * screen_aspect_ratio))};
}
FramebufferLayout DefaultFrameLayout(unsigned width, unsigned height) {
@@ -29,8 +29,8 @@ FramebufferLayout DefaultFrameLayout(unsigned width, unsigned height) {
const float emulation_aspect_ratio{static_cast<float>(ScreenUndocked::Height) /
ScreenUndocked::Width};
- MathUtil::Rectangle<unsigned> screen_window_area{0, 0, width, height};
- MathUtil::Rectangle<unsigned> screen = maxRectangle(screen_window_area, emulation_aspect_ratio);
+ Common::Rectangle<unsigned> screen_window_area{0, 0, width, height};
+ Common::Rectangle<unsigned> screen = MaxRectangle(screen_window_area, emulation_aspect_ratio);
float window_aspect_ratio = static_cast<float>(height) / width;