Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

framebuffer: Add hybrid layout mode to FrameLayoutFromResolutionScale #751

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions src/core/frontend/framebuffer_layout.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Citra Emulator Project
// Copyright Citra Emulator Project / Azahar Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

Expand Down Expand Up @@ -443,8 +443,19 @@ FramebufferLayout FrameLayoutFromResolutionScale(u32 res_scale, bool is_secondar
Settings::values.upright_screen.GetValue(), 1,
Settings::SmallScreenPosition::MiddleRight);

case Settings::LayoutOption::Default:
case Settings::LayoutOption::HybridScreen:
default:
width = (Core::kScreenTopWidth + Core::kScreenBottomWidth) * res_scale;
height = (Core::kScreenTopHeight + Core::kScreenBottomHeight) * res_scale;

if (Settings::values.upright_screen.GetValue()) {
std::swap(width, height);
}

return HybridScreenLayout(width, height, Settings::values.swap_screen.GetValue(),
Settings::values.upright_screen.GetValue());

case Settings::LayoutOption::Default:
width = Core::kScreenTopWidth * res_scale;
height = (Core::kScreenTopHeight + Core::kScreenBottomHeight) * res_scale;

Expand Down
Loading